Here is the logging from my code. It is successful in getting the interface registered. But so far I have not been able to push any data into the Rx queues or getting anything from the Tx queues.
Code Block [result = IOUserNetworkPacketBufferPool::Create(this, "usb_net_pool", 64, 64, 2048, &ivars->pool)] kIOReturnSuccess |
[result = IODispatchQueue::Create("usb_tx_net_dq", 0, 0, &ivars->txSubmissionDispatchQueue)] kIOReturnSuccess |
[result = IOUserNetworkTxSubmissionQueue::Create(ivars->pool, this, 16, 0, ivars->txSubmissionDispatchQueue, &ivars->txSubmissionQueue)] kIOReturnSuccess |
[result = OSObject::SetDispatchQueue("tx_net_dq", ivars->txSubmissionDispatchQueue)] kIOReturnSuccess |
[result = CreateActionTxAvailable(sizeof(void *), &ivars->txSubmitAction)] kIOReturnSuccess |
[result = ivars->txSubmissionQueue->CopyDataQueue(&ivars->txDataQueueDispatchSource)] kIOReturnSuccess |
[result = ivars->txDataQueueDispatchSource->SetDataAvailableHandler(ivars->txSubmitAction)] kIOReturnSuccess |
[result = IODispatchQueue::Create("usb_tx_pipe_dq", 0, 0, &ivars->txCompleteDispatchQueue)] kIOReturnSuccess |
[result = IOUserNetworkTxCompletionQueue::Create(ivars->pool, this, 16, 0, ivars->txCompleteDispatchQueue, &ivars->txCompletionQueue)] kIOReturnSuccess |
[result = OSObject::SetDispatchQueue("tx_pipe_dq", ivars->txCompleteDispatchQueue)] kIOReturnSuccess |
[result = CreateActionTxComplete(sizeof(void *), &ivars->txCompleteAction)] kIOReturnSuccess |
[result = IOUserNetworkRxSubmissionQueue::Create(ivars->pool, this, 0x400, 0, 0, &ivars->rxSubmissionQueue)] kIOReturnSuccess |
[result = IODispatchQueue::Create("usb_rx_pipe_dq", 0, 0, &ivars->rxCompleteDispatchQueue)] kIOReturnSuccess |
[result = IOUserNetworkRxCompletionQueue::Create(ivars->pool, this, 16, 0, ivars->rxCompleteDispatchQueue, &ivars->rxCompletionQueue)] kIOReturnSuccess |
[result = OSObject::SetDispatchQueue("rx_pipe_dq", ivars->rxCompleteDispatchQueue)] kIOReturnSuccess |
[result = RegisterEthernetInterface(DataMacAddress, ivars->pool, ivars->queues, 4)] kIOReturnSuccess |
[result = ReportAvailableMediaTypes(mediaTypes, 1)] kIOReturnSuccess |