00001 /*############################################################################## 00002 00003 nIP - nano IP stack 00004 00005 File : numbers.h 00006 00007 Description : Assigned Numbers in Network Byte Order 00008 00009 Copyright notice: 00010 00011 Copyright (C) 2005 - 00012 Andreas Dittrich, dittrich@informatik.hu-berlin.de 00013 Jon Kowal, kowal@informatik.hu-berlin.de 00014 00015 This program is free software; you can redistribute it and/or 00016 modify it under the terms of the GNU General Public License 00017 as published by the Free Software Foundation; either version 2 00018 of the License, or (at your option) any later version. 00019 00020 This program is distributed in the hope that it will be useful, 00021 but WITHOUT ANY WARRANTY; without even the implied warranty of 00022 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00023 GNU General Public License for more details. 00024 00025 You should have received a copy of the GNU General Public License 00026 along with this program; if not, write to the Free Software 00027 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00028 00029 ##############################################################################*/ 00030 00031 00032 #ifndef _NUMBERS_H_ 00033 #define _NUMBERS_H_ 00034 00035 // include definition of ENDIANNESS 00036 #include NIP_ARCH_FILE(endianness.h) 00037 00038 // The predefined numbers will be stored depending on the system's byte 00039 // order. That will spare future conversions between host and network byte order. 00040 00041 #if ( ENDIANNESS == BIG_ENDIAN ) 00042 00043 /** \name Protocol Types for ARP and Ethernet*/ 00044 /** check "Assigned Numbers" RFC for more */ 00045 //@{ 00046 #define NIP_NUM_PR_IP 0x0800 00047 #define NIP_NUM_PR_ARP 0x0806 00048 #define NIP_NUM_PR_IPv6 0x86DD 00049 #define NIP_NUM_IP_PROTO_UDP 0x0011 /* 16-bit representation of protocol ID 17*/ 00050 #define NIP_NUM_IP_PROTO_TCP 0x0006 /* 16-bit representation of protocol ID 06 */ 00051 //@} 00052 /** \name other constants*/ 00053 //@{ 00054 #define NIP_NUM_DNS_CLASS_IN 0x0001 /* DNS record class IN, decimal value 0001 */ 00055 //@} 00056 00057 #else // ENDIANNESS 00058 00059 /** \name Protocol Types for ARP and Ethernet*/ 00060 /** check "Assigned Numbers" RFC for more */ 00061 //@{ 00062 #define NIP_NUM_PR_IP 0x0008 00063 #define NIP_NUM_PR_ARP 0x0608 00064 #define NIP_NUM_PR_IPv6 0xDD86 00065 00066 #define NIP_NUM_IP_PROTO_UDP 0x1100 /* 16-bit representation of protocol ID 17 */ 00067 #define NIP_NUM_IP_PROTO_TCP 0x0600 /* 16-bit representation of protocol ID 06 */ 00068 //@} 00069 00070 /** \name other constants*/ 00071 //@{ 00072 #define NIP_NUM_DNS_CLASS_IN 0x0100 /* DNS record class IN, decimal value 0001 */ 00073 //@} 00074 00075 #endif // ENDIANNESS 00076 00077 #endif //_NUMBERS_H_