Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PF_PACKET on Mac OS X?



The alternative to PF_PACKET for BSD derivatives like Darwin is BPF.

Regards,

Justin

On Saturday, June 28, 2003, at 04:14 PM, Terry Simons wrote:

Hi,

I'm working on a project that has incorporated some interface lookup code for enumerating out ethernet interfaces on Linux.

The problem I'm running into is that the project uses PF_PACKET as the socket type when creating the socket:

Here's the function call in question:

sd = socket(PF_PACKET, SOCK_RAW, 0);

I did some digging and found the following:

The Mac OS X 10.2.6 man page for socket() lists the following understood formats:

AF_UNIX (UNIX internal protocols),
AF_INET (ARPA Internet protocols),
AF_ISO (ISO protocols),
AF_NS (Xerox Network Systems protocols), and
AF_IMPLINK (IMP host at IMP link layer).


Linux's socket() man page shows the following:

PF_UNIX, PF_LOCAL Local communication unix(7)
PF_INET IPv4 Internet protocols ip(7)
PF_INET6 IPv6 Internet protocols
PF_IPX IPX - Novell protocols
PF_NETLINK Kernel user interface device netlink(7)
PF_X25 ITU-T X.25 / ISO-8208 protocol x25(7)
PF_AX25 Amateur radio AX.25 protocol
PF_ATMPVC Access to raw ATM PVCs
PF_APPLETALK Appletalk ddp(7)
PF_PACKET Low level packet interface packet(7)

My question is:

Do I have an alternative option similar to PF_PACKET?

If not, is there an alternative?

Thanks!

Terry Simons
Network and Laptop Support
Marriott Library, University of Utah
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.


--
/~\ The ASCII Justin C. Walker, Curmudgeon-at-Large
\ / Ribbon Campaign
X Help cure HTML Email
/ \
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.

References: 
 >PF_PACKET on Mac OS X? (From: Terry Simons <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.