Thanks
--
Alex
You can get them dynamically using getprotobyname(3), which looks in
/etc/protocols. However, some of them are hard-coded in the header file
netinet/in.h:
/*
* Protocols
*/
#define IPPROTO_IP 0 /* dummy for IP */
#define IPPROTO_ICMP 1 /* control message protocol */
#define IPPROTO_IGMP 2 /* group control protocol */
#define IPPROTO_GGP 3 /* gateway^2 (deprecated) */
#define IPPROTO_ENCAP 4 /* IP in IP encapsulation */
#define IPPROTO_TCP 6 /* tcp */
#define IPPROTO_EGP 8 /* exterior gateway protocol */
#define IPPROTO_PUP 12 /* pup */
#define IPPROTO_UDP 17 /* user datagram protocol */
#define IPPROTO_IDP 22 /* xns idp */
#define IPPROTO_RSVP 46 /* rsvp */
#define IPPROTO_HELLO 63 /* "hello" routing protocol */
#define IPPROTO_ND 77 /* UNOFFICIAL net disk proto */
#define IPPROTO_EON 80 /* ISO clnp */
#define IPPROTO_RAW 255 /* raw IP packet */
#define IPPROTO_MAX 256
--
Barry Margolin, bar...@genuity.net
Genuity, Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.