Re: Raw Ehternet Sockets on 10.1?
Re: Raw Ehternet Sockets on 10.1?
- Subject: Re: Raw Ehternet Sockets on 10.1?
- From: "Duane Murphy" <email@hidden>
- Date: Fri, 26 Sep 2003 13:03:02 -0700
Could part of the problem be that ndrv_demux_desc and SETDMXSPEC are not
available in 10.1? How does one listen for packets of raw sockets on 10.1?
Here is an example of what we are doing to register to listen. This does
not return an error.
int add_protocol_match(
int fd, u_int32_t prot_family, ndrv_demux_desc* in_demux )
{
ndrv_protocol_desc desc = {};
desc.version = NDRV_PROTOCOL_DESC_VERS;
desc.protocol_family = prot_family;
desc.demux_count = 1;
desc.demux_list = in_demux;
int result = setsockopt(
fd, SOL_NDRVPROTO, NDRV_SETDMXSPEC,
reinterpret_cast< caddr_t >( &desc ),
sizeof desc );
return result;
}
Thank you for any clarification or help.
--- At Fri, 26 Sep 2003 12:42:02 -0700, Duane Murphy wrote:
>
--- At Fri, 26 Sep 2003 12:21:42 -0700, Duane Murphy wrote:
>
>
>We are using raw ethernet sockets to communicate to a custom hardware
>
>device. On 10.2 everything seems to be working correctly. However, we are
>
>not having success on 10.1.
>
>
>
>Network traces show that packets are being successfully sent and the
>
>device is responding. However, we never see the packets.
>
>
>
>We are using CFSocket to manage the socket. We only use the
>
>kCFSocketReadCallBack. We also use setsockopt with NDRV_SETDMXSPEC in
>
>order to register to recieve packets of the correct type.
>
>
>
>I have not been able to find specific notes that would indicate a problem
>
>on 10.1. Our working theory is that it is one of these (setsockopt or
>
>CFSocket) that are the problem.
>
>
>
>Does anyone have a clue what we could be doing wrong to prevent things
>
>from working on 10.1?
>
>
>
>Thanks for the help,
>
>
I should add that this is on 10.1.5. We would at least like to support
>
10.1.5 but more previous versions would be great (up to
>
SystemConfiguration support).
...Duane
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.