Hatena::ブログ(Diary)

TECHNERD::INIT このページをアンテナに追加

2008-12-17

上位層プロトコルタイプ

IPヘッダ上位層プロトコルタイプ(linux/in.h)

 /* Standard well-defined IP protocols.  */
 enum {
  IPPROTO_IP = 0,       /* Dummy protocol for TCP       */
  IPPROTO_ICMP = 1,     /* Internet Control Message Protocol    */
  IPPROTO_IGMP = 2,     /* Internet Group Management Protocol   */
  IPPROTO_IPIP = 4,     /* IPIP tunnels (older KA9Q tunnels use 94) */
  IPPROTO_TCP = 6,      /* Transmission Control Protocol    */
  IPPROTO_EGP = 8,      /* Exterior Gateway Protocol        */
  IPPROTO_PUP = 12,     /* PUP protocol             */
  IPPROTO_UDP = 17,     /* User Datagram Protocol       */
  IPPROTO_IDP = 22,     /* XNS IDP protocol         */
  IPPROTO_RSVP = 46,        /* RSVP protocol            */
  IPPROTO_GRE = 47,     /* Cisco GRE tunnels (rfc 1701,1702)    */
  IPPROTO_IPV6   = 41,      /* IPv6-in-IPv4 tunnelling      */
  IPPROTO_PIM    = 103,     /* Protocol Independent Multicast   */
  IPPROTO_ESP = 50,            /* Encapsulation Security Payload protocol */
  IPPROTO_AH = 51,             /* Authentication Header protocol       */
  IPPROTO_COMP   = 108,                /* Compression Header protocol */
  IPPROTO_RAW    = 255,     /* Raw IP packets           */
  IPPROTO_MAX
 };

Ethernetヘッダ上位層プロトコルタイプ(linux/if_ehter.h)

 /*
  *  These are the defined Ethernet Protocol ID's.
  */
 #define ETH_P_LOOP  0x0060      /* Ethernet Loopback packet */
 #define ETH_P_PUP   0x0200      /* Xerox PUP packet     */
 #define ETH_P_PUPAT 0x0201      /* Xerox PUP Addr Trans packet  */
 #define ETH_P_IP    0x0800      /* Internet Protocol packet */
 #define ETH_P_X25   0x0805      /* CCITT X.25           */
 #define ETH_P_ARP   0x0806      /* Address Resolution packet    */
 #define ETH_P_BPQ   0x08FF      /* G8BPQ AX.25 Ethernet Packet  [ NOT AN OFFICIALLY REGISTERED ID ] */
 #define ETH_P_IEEEPUP   0x0a00      /* Xerox IEEE802.3 PUP packet */
 #define ETH_P_IEEEPUPAT 0x0a01      /* Xerox IEEE802.3 PUP Addr Trans packet */
 #define ETH_P_DEC       0x6000          /* DEC Assigned proto           */
 #define ETH_P_DNA_DL    0x6001          /* DEC DNA Dump/Load            */
 #define ETH_P_DNA_RC    0x6002          /* DEC DNA Remote Console       */
 #define ETH_P_DNA_RT    0x6003          /* DEC DNA Routing              */
 #define ETH_P_LAT       0x6004          /* DEC LAT                      */
 #define ETH_P_DIAG      0x6005          /* DEC Diagnostics              */
 #define ETH_P_CUST      0x6006          /* DEC Customer use             */
 #define ETH_P_SCA       0x6007          /* DEC Systems Comms Arch       */
 #define ETH_P_RARP      0x8035      /* Reverse Addr Res packet  */
 #define ETH_P_ATALK 0x809B      /* Appletalk DDP        */
 #define ETH_P_AARP  0x80F3      /* Appletalk AARP       */
 #define ETH_P_IPX   0x8137      /* IPX over DIX         */
 #define ETH_P_IPV6  0x86DD      /* IPv6 over bluebook       */
 #define ETH_P_PPP_DISC  0x8863      /* PPPoE discovery messages     */
 #define ETH_P_PPP_SES   0x8864      /* PPPoE session messages   */
 #define ETH_P_ATMMPOA   0x884c      /* MultiProtocol Over ATM   */
 #define ETH_P_ATMFATE   0x8884      /* Frame-based ATM Transport over Ethernet */