00001 /*############################################################################## 00002 00003 nIP - nano IP stack 00004 00005 File : ports.h 00006 00007 Description : Defines several standard-ports. 00008 00009 Copyright notice: 00010 00011 Copyright (C) 2006 - 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 _PORTS_H_ 00033 #define _PORTS_H_ 00034 00035 // include definition of ENDIANNESS 00036 #include NIP_ARCH_FILE(endianness.h) 00037 00038 // The predefined port 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 TCP Ports */ 00044 //@{ 00045 #define NIP_TCP_PORT_HTTP 0x0050 //!< decimal 80 00046 #define NIP_TCP_PORT_TELNET 0x0017 //!< decimal 23 00047 00048 //@} 00049 00050 /** \name UDP Ports */ 00051 //@{ 00052 #define NIP_UDP_PORT_DHCPCLIENT 0x0044 //!< decimal 68 00053 #define NIP_UDP_PORT_DHCPSERVER 0x0043 //!< decimal 67 00054 #define NIP_UDP_PORT_NTP 0x0080 //!< decimal 123 00055 #define NIP_UDP_PORT_MDNS 0x14E9 //!< decimal 5353 00056 //@} 00057 00058 #else // ENDIANNESS 00059 00060 /** \name TCP Ports */ 00061 //@{ 00062 #define NIP_TCP_PORT_HTTP 0x5000 //!< decimal 80 00063 #define NIP_TCP_PORT_TELNET 0x1700 //!< decimal 23 00064 00065 //@} 00066 00067 /** \name UDP Ports */ 00068 //@{ 00069 #define NIP_UDP_PORT_DHCPCLIENT 0x4400 //!< decimal 68 00070 #define NIP_UDP_PORT_DHCPSERVER 0x4300 //!< decimal 67 00071 #define NIP_UDP_PORT_NTP 0x8000 //!< decimal 123 00072 #define NIP_UDP_PORT_MDNS 0xE914 //!< decimal 5353 00073 //@} 00074 00075 #endif // ENDIANNESS 00076 00077 #endif //_PORTS_H_