Subversion Repositories HelenOS

Compare Revisions

No changes between revisions

Ignore whitespace Rev 3845 → Rev 3846

/branches/network/uspace/srv/net/include/sockaddr.h
0,0 → 1,104
/*
* Copyright (c) 2008 Lukas Mejdrech
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* - The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
 
/** @addtogroup net
* @{
*/
 
/** @file
*
*/
 
#ifndef __NET_SOCKADDR_H__
#define __NET_SOCKADDR_H__
 
#include <sys/types.h>
 
#define INET_ADDRSTRLEN ( 4 * 3 + 3 )
#define INET6_ADDRSTRLEN ( 8 * 4 + 7 )
 
typedef struct sockaddr sockaddr_t;
typedef struct in_addr in_addr_t;
typedef struct sockaddr_in sockaddr_in_t;
typedef struct sockaddr_in6 sockaddr_in6_t;
typedef struct addrinfo addrinfo_t;
 
int inet_ntop( uint16_t family, const uint8_t * data, char * address, size_t length );
int inet_pton( uint16_t family, const char * address, uint8_t * data );
 
struct sockaddr{
uint16_t sa_family; // address family, AF_xxx
uint8_t sa_data[ 14 ]; // 14 bytes of protocol address
};
 
struct in_addr{
uint32_t s_addr; // that's a 32-bit int (4 bytes)
};
 
struct sockaddr_in{
uint16_t sin_family; // Address family, AF_INET
uint16_t sin_port; // Port number
struct in_addr sin_addr; // Internet address
uint8_t sin_zero[ 8 ]; // Same size as struct sockaddr
};
 
struct in6_addr{
unsigned char s6_addr[ 16 ]; // IPv6 address
};
 
struct sockaddr_in6{
uint16_t sin6_family; // address family, AF_INET6
uint16_t sin6_port; // port number, Network Byte Order
uint32_t sin6_flowinfo; // IPv6 flow information
struct in6_addr sin6_addr; // IPv6 address
uint32_t sin6_scope_id; // Scope ID
};
 
struct addrinfo{
int ai_flags; // AI_PASSIVE, AI_CANONNAME, etc.
uint16_t ai_family; // AF_INET, AF_INET6, AF_UNSPEC
int ai_socktype; // SOCK_STREAM, SOCK_DGRAM
int ai_protocol; // use 0 for "any"
size_t ai_addrlen; // size of ai_addr in bytes
struct sockaddr * ai_addr; // struct sockaddr_in or _in6
char * ai_canonname; // full canonical hostname
struct addrinfo * ai_next; // linked list, next node
};
 
/*int getaddrinfo(const char *node, // e.g. "www.example.com" or IP
const char *service, // e.g. "http" or port number
const struct addrinfo *hints,
struct addrinfo **res);
 
getnameinfo
*/
 
#endif
 
/** @}
*/
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/branches/network/uspace/srv/net/include/hardware.h
0,0 → 1,184
/*
* Copyright (c) 2008 Lukas Mejdrech
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* - The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
 
/** @addtogroup net
* @{
*/
 
/** @file
* Hardware types according to the online IANA - Address Resolution Protocol (ARP) Parameters - <http://www.iana.org/assignments/arp-parameters/arp-parameters.xml>, cited January 14 2009.
* Names similar to the linux src/include/linux/if_arp.h header file.
*/
 
#ifndef __NET_HW_TYPES_H__
#define __NET_HW_TYPES_H__
 
/** Ethernet (10Mb) hardware type.
*/
#define HW_ETHER 1
 
/** Experimental Ethernet (3Mb) hardware type.
*/
#define HW_EETHER 2
 
/** Amateur Radio AX.25 hardware type.
*/
#define HW_AX25 3
 
/** Proteon ProNET Token Ring hardware type.
*/
#define HW_PRONET 4
 
/** Chaos hardware type.
*/
#define HW_CHAOS 5
 
/** IEEE 802 Networks hardware type.
*/
#define HW_IEEE802 6
 
/** ARCNET hardware type.
*/
#define HW_ARCNET 7
 
/** Hyperchannel hardware type.
*/
#define HW_Hyperchannel 8
 
/** Lanstar hardware type.
*/
#define HW_Lanstar 9
 
/** Autonet Short Address hardware type.
*/
#define HW_ASA 10
 
/** LocalTalk hardware type.
*/
#define HW_LocalTalk 11
 
/** LocalNet (IBM PCNet or SYTEK LocalNET) hardware type.
*/
#define HW_LocalNet 12
 
/** Ultra link hardware type.
*/
#define HW_Ultra_link 13
 
/** SMDS hardware type.
*/
#define HW_SMDS 14
 
/** Frame Relay DLCI hardware type.
*/
#define HW_DLCI 15
 
/** Asynchronous Transmission Mode (ATM) hardware type.
*/
#define HW_ATM 16
 
/** HDLC hardware type.
*/
#define HW_HDLC 17
 
/** Fibre Channel hardware type.
*/
#define HW_Fibre_Channel 18
 
/** Asynchronous Transmission Mode (ATM) hardware type.
*/
#define HW_ATM2 19
 
/** Serial Line hardware type.
*/
#define HW_Serial_Line 20
 
/** Asynchronous Transmission Mode (ATM) hardware type.
*/
#define HW_ATM3 21
 
/** MIL-STD-188-220 hardware type.
*/
#define HW_MIL_STD_188_220 22
 
/** Metricom hardware type.
*/
#define HW_METRICOM 23
 
/** IEEE 1394.1995 hardware type.
*/
#define HW_IEEE1394 24
 
/** MAPOS hardware type.
*/
#define HW_MAPOS 25
 
/** Twinaxial hardware type.
*/
#define HW_Twinaxial 26
 
/** EUI-64 hardware type.
*/
#define HW_EUI64 27
 
/** HIPARP hardware type.
*/
#define HW_HIPARP 28
 
/** IP and ARP over ISO 7816-3 hardware type.
*/
#define HW_ISO_7816_3 29
 
/** ARPSec hardware type.
*/
#define HW_ARPSec 30
 
/** IPsec tunnel hardware type.
*/
#define HW_IPsec_tunnel 31
 
/** InfiniBand (TM) hardware type.
*/
#define HW_INFINIBAND 32
 
/** TIA-102 Project 25 Common Air Interface (CAI) hardware type.
*/
#define HW_CAI 33
 
/** Wiegand Interface hardware type.
*/
#define HW_Wiegand 34
 
/** Pure IP hardware type.
*/
#define HW_Pure_IP 35
 
#endif
 
/** @}
*/
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/branches/network/uspace/srv/net/include/protocol_map.h
0,0 → 1,79
/*
* Copyright (c) 2008 Lukas Mejdrech
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* - The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
 
/** @addtogroup net
* @{
*/
 
/** @file
*
*/
 
#ifndef __NET_PROTOCOL_MAP_H__
#define __NET_PROTOCOL_MAP_H__
 
#include <ipc/services.h>
 
#include "ethernet_protocols.h"
 
static inline int protocol_map( services_t nil, services_t il ){
switch( nil ){
case SERVICE_ETHERNET:
switch( il ){
case SERVICE_IP:
return ETH_P_IP;
case SERVICE_ARP:
return ETH_P_ARP;
default:
return 0;
}
default:
return 0;
}
}
 
static inline services_t protocol_unmap( services_t nil, int protocol ){
switch( nil ){
case SERVICE_ETHERNET:
switch( protocol ){
case ETH_P_IP:
return SERVICE_IP;
case ETH_P_ARP:
return SERVICE_ARP;
default:
return 0;
}
default:
return 0;
}
}
 
#endif
 
/** @}
*/
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/branches/network/uspace/srv/net/include/byteorder.h
0,0 → 1,103
/*
* Copyright (c) 2008 Lukas Mejdrech
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* - The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
 
/** @addtogroup net
* @{
*/
 
/** @file
* Host - network byte order manipulation functions.
*/
 
#ifndef __NET_BYTEORDER_H__
#define __NET_BYTEORDER_H__
 
#include <byteorder.h>
 
#ifdef ARCH_IS_BIG_ENDIAN
 
// Already in the network byte order.
 
/** Converts the given short number ( 16 bit ) from the host byte order to the network byte order ( big endian ).
* @param number The number in the host byte order to be converted.
* @returns The number in the network byte order.
*/
#define htons( number ) ( number )
 
/** Converts the given long number ( 32 bit ) from the host byte order to the network byte order ( big endian ).
* @param number The number in the host byte order to be converted.
* @returns The number in the network byte order.
*/
#define htonl( number ) ( number )
 
/** Converts the given short number ( 16 bit ) from the network byte order ( big endian ) to the host byte order.
* @param number The number in the network byte order to be converted.
* @returns The number in the host byte order.
*/
#define ntohs( number ) ( number )
 
/** Converts the given long number ( 32 bit ) from the network byte order ( big endian ) to the host byte order.
* @param number The number in the network byte order to be converted.
* @returns The number in the host byte order.
*/
#define ntohl( number ) ( number )
 
#else
 
// Has to be swapped.
 
/** Converts the given short number ( 16 bit ) from the host byte order to the network byte order ( big endian ).
* @param number The number in the host byte order to be converted.
* @returns The number in the network byte order.
*/
#define htons( number ) uint16_t_byteorder_swap( number )
 
/** Converts the given long number ( 32 bit ) from the host byte order to the network byte order ( big endian ).
* @param number The number in the host byte order to be converted.
* @returns The number in the network byte order.
*/
#define htonl( number ) uint32_t_byteorder_swap( number )
 
/** Converts the given short number ( 16 bit ) from the network byte order ( big endian ) to the host byte order.
* @param number The number in the network byte order to be converted.
* @returns The number in the host byte order.
*/
#define ntohs( number ) uint16_t_byteorder_swap( number )
 
/** Converts the given long number ( 32 bit ) from the network byte order ( big endian ) to the host byte order.
* @param number The number in the network byte order to be converted.
* @returns The number in the host byte order.
*/
#define ntohl( number ) uint32_t_byteorder_swap( number )
 
#endif
 
#endif
 
/** @}
*/
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/branches/network/uspace/srv/net/include/ethernet_protocols.h
0,0 → 1,996
/*
* Copyright (c) 2008 Lukas Mejdrech
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* - The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
 
/** @addtogroup net
* @{
*/
 
/** @file
* Ethernet protocol numbers according to the online IANA - Ethernet numbers - <http://www.iana.org/assignments/ethernet-numbers>, cited January 17 2009.
* Names according to the linux src/include/linux/if_ether.h header file.
*/
 
#ifndef __NET_ETHERNET_PROTOCOLS_H__
#define __NET_ETHERNET_PROTOCOLS_H__
 
/** Ethernet loopback packet protocol type.
*/
#define ETH_P_LOOP 0x0060
 
/** XEROX PUP (see 0A00) ethernet protocol type.
*/
#define ETH_P_PUP 0x0200
 
/** PUP Addr Trans (see 0A01) ethernet protocol type.
*/
#define ETH_P_PUPAT 0x0201
 
/** Nixdorf ethernet protocol type.
*/
#define ETH_P_Nixdorf 0x0400
 
/** XEROX NS IDP ethernet protocol type.
*/
#define ETH_P_XEROX_NS_IDP 0x0600
 
/** DLOG ethernet protocol type.
*/
#define ETH_P_DLOG 0x0660
 
/** DLOG ethernet protocol type.
*/
#define ETH_P_DLOG2 0x0661
 
/** Internet IP (IPv4) ethernet protocol type.
*/
#define ETH_P_IP 0x0800
 
/** X.75 Internet ethernet protocol type.
*/
#define ETH_P_X_75 0x0801
 
/** NBS Internet ethernet protocol type.
*/
#define ETH_P_NBS 0x0802
 
/** ECMA Internet ethernet protocol type.
*/
#define ETH_P_ECMA 0x0803
 
/** Chaosnet ethernet protocol type.
*/
#define ETH_P_Chaosnet 0x0804
 
/** X.25 Level 3 ethernet protocol type.
*/
#define ETH_P_X25 0x0805
 
/** ARP ethernet protocol type.
*/
#define ETH_P_ARP 0x0806
 
/** XNS Compatability ethernet protocol type.
*/
#define ETH_P_XNS_Compatability 0x0807
 
/** Frame Relay ARP ethernet protocol type.
*/
#define ETH_P_Frame_Relay_ARP 0x0808
 
/** Symbolics Private ethernet protocol type.
*/
#define ETH_P_Symbolics_Private 0x081C
 
/** Xyplex ethernet protocol type.
*/
#define ETH_P_Xyplex_MIN 0x0888
 
/** Xyplex ethernet protocol type.
*/
#define ETH_P_Xyplex_MAX 0x088A
 
/** Ungermann-Bass net debugr ethernet protocol type.
*/
#define ETH_P_Ungermann_Bass_net_debugr 0x0900
 
/** Xerox IEEE802.3 PUP ethernet protocol type.
*/
#define ETH_P_IEEEPUP 0x0A00
 
/** PUP Addr Trans ethernet protocol type.
*/
#define ETH_P_IEEEPUPAT 0x0A01
 
/** Banyan VINES ethernet protocol type.
*/
#define ETH_P_Banyan_VINES 0x0BAD
 
/** VINES Loopback ethernet protocol type.
*/
#define ETH_P_VINES_Loopback 0x0BAE
 
/** VINES Echo ethernet protocol type.
*/
#define ETH_P_VINES_Echo 0x0BAF
 
/** Berkeley Trailer nego ethernet protocol type.
*/
#define ETH_P_Berkeley_Trailer_nego 0x1000
 
/** Berkeley Trailer encap/IP ethernet protocol type.
*/
#define ETH_P_Berkeley_Trailer_encapIP_MIN 0x1001
 
/** Berkeley Trailer encap/IP ethernet protocol type.
*/
#define ETH_P_Berkeley_Trailer_encapIP_MAX 0x100F
 
/** Valid Systems ethernet protocol type.
*/
#define ETH_P_Valid_Systems 0x1600
 
/** PCS Basic Block Protocol ethernet protocol type.
*/
#define ETH_P_PCS_Basic_Block_Protocol 0x4242
 
/** BBN Simnet ethernet protocol type.
*/
#define ETH_P_BBN_Simnet 0x5208
 
/** DEC Unassigned (Exp.) ethernet protocol type.
*/
#define ETH_P_DEC 0x6000
 
/** DEC MOP Dump/Load ethernet protocol type.
*/
#define ETH_P_DNA_DL 0x6001
 
/** DEC MOP Remote Console ethernet protocol type.
*/
#define ETH_P_DNA_RC 0x6002
 
/** DEC DECNET Phase IV Route ethernet protocol type.
*/
#define ETH_P_DNA_RT 0x6003
 
/** DEC LAT ethernet protocol type.
*/
#define ETH_P_LAT 0x6004
 
/** DEC Diagnostic Protocol ethernet protocol type.
*/
#define ETH_P_DIAG 0x6005
 
/** DEC Customer Protocol ethernet protocol type.
*/
#define ETH_P_CUST 0x6006
 
/** DEC LAVC, SCA ethernet protocol type.
*/
#define ETH_P_SCA 0x6007
 
/** DEC Unassigned ethernet protocol type.
*/
#define ETH_P_DEC_Unassigned_MIN 0x6008
 
/** DEC Unassigned ethernet protocol type.
*/
#define ETH_P_DEC_Unassigned_MAX 0x6009
 
/** Com Corporation ethernet protocol type.
*/
#define ETH_P_Com_Corporation_MIN 0x6010
 
/** Com Corporation ethernet protocol type.
*/
#define ETH_P_Com_Corporation_MAX 0x6014
 
/** Trans Ether Bridging ethernet protocol type.
*/
#define ETH_P_Trans_Ether_Bridging 0x6558
 
/** Raw Frame Relay ethernet protocol type.
*/
#define ETH_P_Raw_Frame_Relay 0x6559
 
/** Ungermann-Bass download ethernet protocol type.
*/
#define ETH_P_Ungermann_Bass_download 0x7000
 
/** Ungermann-Bass dia/loop ethernet protocol type.
*/
#define ETH_P_Ungermann_Bass_dialoop 0x7002
 
/** LRT ethernet protocol type.
*/
#define ETH_P_LRT_MIN 0x7020
 
/** LRT ethernet protocol type.
*/
#define ETH_P_LRT_MAX 0x7029
 
/** Proteon ethernet protocol type.
*/
#define ETH_P_Proteon 0x7030
 
/** Cabletron ethernet protocol type.
*/
#define ETH_P_Cabletron 0x7034
 
/** Cronus VLN ethernet protocol type.
*/
#define ETH_P_Cronus_VLN 0x8003
 
/** Cronus Direct ethernet protocol type.
*/
#define ETH_P_Cronus_Direct 0x8004
 
/** HP Probe ethernet protocol type.
*/
#define ETH_P_HP_Probe 0x8005
 
/** Nestar ethernet protocol type.
*/
#define ETH_P_Nestar 0x8006
 
/** AT&T ethernet protocol type.
*/
#define ETH_P_AT_T 0x8008
 
/** Excelan ethernet protocol type.
*/
#define ETH_P_Excelan 0x8010
 
/** SGI diagnostics ethernet protocol type.
*/
#define ETH_P_SGI_diagnostics 0x8013
 
/** SGI network games ethernet protocol type.
*/
#define ETH_P_SGI_network_games 0x8014
 
/** SGI reserved ethernet protocol type.
*/
#define ETH_P_SGI_reserved 0x8015
 
/** SGI bounce server ethernet protocol type.
*/
#define ETH_P_SGI_bounce_server 0x8016
 
/** Apollo Domain ethernet protocol type.
*/
#define ETH_P_Apollo_Domain 0x8019
 
/** Tymshare ethernet protocol type.
*/
#define ETH_P_Tymshare 0x802E
 
/** Tigan, Inc. ethernet protocol type.
*/
#define ETH_P_Tigan 0x802F
 
/** Reverse ARP ethernet protocol type.
*/
#define ETH_P_RARP 0x8035
 
/** Aeonic Systems ethernet protocol type.
*/
#define ETH_P_Aeonic_Systems 0x8036
 
/** DEC LANBridge ethernet protocol type.
*/
#define ETH_P_DEC_LANBridge 0x8038
 
/** DEC Unassigned ethernet protocol type.
*/
#define ETH_P_DEC_Unassigned_MIN1 0x8039
 
/** DEC Unassigned ethernet protocol type.
*/
#define ETH_P_DEC_Unassigned_MAX2 0x803C
 
/** DEC Ethernet Encryption ethernet protocol type.
*/
#define ETH_P_DEC_Ethernet_Encryption 0x803D
 
/** DEC Unassigned ethernet protocol type.
*/
#define ETH_P_DEC_Unassigned 0x803E
 
/** DEC LAN Traffic Monitor ethernet protocol type.
*/
#define ETH_P_DEC_LAN_Traffic_Monitor 0x803F
 
/** DEC Unassigned ethernet protocol type.
*/
#define ETH_P_DEC_Unassigned_MIN3 0x8040
 
/** DEC Unassigned ethernet protocol type.
*/
#define ETH_P_DEC_Unassigned_MAX3 0x8042
 
/** Planning Research Corp. ethernet protocol type.
*/
#define ETH_P_Planning_Research_Corp 0x8044
 
/** AT&T ethernet protocol type.
*/
#define ETH_P_AT_T2 0x8046
 
/** AT&T ethernet protocol type.
*/
#define ETH_P_AT_T3 0x8047
 
/** ExperData ethernet protocol type.
*/
#define ETH_P_ExperData 0x8049
 
/** Stanford V Kernel exp. ethernet protocol type.
*/
#define ETH_P_Stanford_V_Kernel_exp 0x805B
 
/** Stanford V Kernel prod. ethernet protocol type.
*/
#define ETH_P_Stanford_V_Kernel_prod 0x805C
 
/** Evans & Sutherland ethernet protocol type.
*/
#define ETH_P_Evans_Sutherland 0x805D
 
/** Little Machines ethernet protocol type.
*/
#define ETH_P_Little_Machines 0x8060
 
/** Counterpoint Computers ethernet protocol type.
*/
#define ETH_P_Counterpoint_Computers 0x8062
 
/** Univ. of Mass. @ Amherst ethernet protocol type.
*/
#define ETH_P_Univ_of_Mass 0x8065
 
/** Univ. of Mass. @ Amherst ethernet protocol type.
*/
#define ETH_P_Univ_of_Mass2 0x8066
 
/** Veeco Integrated Auto. ethernet protocol type.
*/
#define ETH_P_Veeco_Integrated_Auto 0x8067
 
/** General Dynamics ethernet protocol type.
*/
#define ETH_P_General_Dynamics 0x8068
 
/** AT&T ethernet protocol type.
*/
#define ETH_P_AT_T4 0x8069
 
/** Autophon ethernet protocol type.
*/
#define ETH_P_Autophon 0x806A
 
/** ComDesign ethernet protocol type.
*/
#define ETH_P_ComDesign 0x806C
 
/** Computgraphic Corp. ethernet protocol type.
*/
#define ETH_P_Computgraphic_Corp 0x806D
 
/** Landmark Graphics Corp. ethernet protocol type.
*/
#define ETH_P_Landmark_Graphics_Corp_MIN 0x806E
 
/** Landmark Graphics Corp. ethernet protocol type.
*/
#define ETH_P_Landmark_Graphics_Corp_MAX 0x8077
 
/** Matra ethernet protocol type.
*/
#define ETH_P_Matra 0x807A
 
/** Dansk Data Elektronik ethernet protocol type.
*/
#define ETH_P_Dansk_Data_Elektronik 0x807B
 
/** Merit Internodal ethernet protocol type.
*/
#define ETH_P_Merit_Internodal 0x807C
 
/** Vitalink Communications ethernet protocol type.
*/
#define ETH_P_Vitalink_Communications_MIN 0x807D
 
/** Vitalink Communications ethernet protocol type.
*/
#define ETH_P_Vitalink_Communications_MAX 0x807F
 
/** Vitalink TransLAN III ethernet protocol type.
*/
#define ETH_P_Vitalink_TransLAN_III 0x8080
 
/** Counterpoint Computers ethernet protocol type.
*/
#define ETH_P_Counterpoint_Computers_MIN 0x8081
 
/** Counterpoint Computers ethernet protocol type.
*/
#define ETH_P_Counterpoint_Computers_MAX 0x8083
 
/** Appletalk ethernet protocol type.
*/
#define ETH_P_ATALK 0x809B
 
/** Datability ethernet protocol type.
*/
#define ETH_P_Datability_MIN 0x809C
 
/** Datability ethernet protocol type.
*/
#define ETH_P_Datability_MAX 0x809E
 
/** Spider Systems Ltd. ethernet protocol type.
*/
#define ETH_P_Spider_Systems_Ltd 0x809F
 
/** Nixdorf Computers ethernet protocol type.
*/
#define ETH_P_Nixdorf_Computers 0x80A3
 
/** Siemens Gammasonics Inc. ethernet protocol type.
*/
#define ETH_P_Siemens_Gammasonics_Inc_MIN 0x80A4
 
/** Siemens Gammasonics Inc. ethernet protocol type.
*/
#define ETH_P_Siemens_Gammasonics_Inc_MAX 0x80B3
 
/** DCA Data Exchange Cluster ethernet protocol type.
*/
#define ETH_P_DCA_Data_Exchange_Cluster_MIN 0x80C0
 
/** DCA Data Exchange Cluster ethernet protocol type.
*/
#define ETH_P_DCA_Data_Exchange_Cluster_MAX 0x80C3
 
/** Banyan Systems ethernet protocol type.
*/
#define ETH_P_Banyan_Systems 0x80C4
 
/** Banyan Systems ethernet protocol type.
*/
#define ETH_P_Banyan_Systems2 0x80C5
 
/** Pacer Software ethernet protocol type.
*/
#define ETH_P_Pacer_Software 0x80C6
 
/** Applitek Corporation ethernet protocol type.
*/
#define ETH_P_Applitek_Corporation 0x80C7
 
/** Intergraph Corporation ethernet protocol type.
*/
#define ETH_P_Intergraph_Corporation_MIN 0x80C8
 
/** Intergraph Corporation ethernet protocol type.
*/
#define ETH_P_Intergraph_Corporation_MAX 0x80CC
 
/** Harris Corporation ethernet protocol type.
*/
#define ETH_P_Harris_Corporation_MIN 0x80CD
 
/** Harris Corporation ethernet protocol type.
*/
#define ETH_P_Harris_Corporation_MAX 0x80CE
 
/** Taylor Instrument ethernet protocol type.
*/
#define ETH_P_Taylor_Instrument_MIN 0x80CF
 
/** Taylor Instrument ethernet protocol type.
*/
#define ETH_P_Taylor_Instrument_MAX 0x80D2
 
/** Rosemount Corporation ethernet protocol type.
*/
#define ETH_P_Rosemount_Corporation_MIN 0x80D3
 
/** Rosemount Corporation ethernet protocol type.
*/
#define ETH_P_Rosemount_Corporation_MAX 0x80D4
 
/** IBM SNA Service on Ether ethernet protocol type.
*/
#define ETH_P_IBM_SNA_Service_on_Ether 0x80D5
 
/** Varian Associates ethernet protocol type.
*/
#define ETH_P_Varian_Associates 0x80DD
 
/** Integrated Solutions TRFS ethernet protocol type.
*/
#define ETH_P_Integrated_Solutions_TRFS_MIN 0x80DE
 
/** Integrated Solutions TRFS ethernet protocol type.
*/
#define ETH_P_Integrated_Solutions_TRFS_MAX 0x80DF
 
/** Allen-Bradley ethernet protocol type.
*/
#define ETH_P_Allen_Bradley_MIN 0x80E0
 
/** Allen-Bradley ethernet protocol type.
*/
#define ETH_P_Allen_Bradley_MAX 0x80E3
 
/** Datability ethernet protocol type.
*/
#define ETH_P_Datability_MIN2 0x80E4
 
/** Datability ethernet protocol type.
*/
#define ETH_P_Datability_MAX2 0x80F0
 
/** Retix ethernet protocol type.
*/
#define ETH_P_Retix 0x80F2
 
/** AppleTalk AARP (Kinetics) ethernet protocol type.
*/
#define ETH_P_AARP 0x80F3
 
/** Kinetics ethernet protocol type.
*/
#define ETH_P_Kinetics_MIN 0x80F4
 
/** Kinetics ethernet protocol type.
*/
#define ETH_P_Kinetics_MAX 0x80F5
 
/** Apollo Computer ethernet protocol type.
*/
#define ETH_P_Apollo_Computer 0x80F7
 
/** Wellfleet Communications ethernet protocol type.
*/
#define ETH_P_Wellfleet_Communications 0x80FF
 
/** IEEE 802.1Q VLAN-tagged frames (initially Wellfleet) ethernet protocol type.
*/
#define ETH_P_8021Q 0x8100
 
/** Wellfleet Communications ethernet protocol type.
*/
#define ETH_P_Wellfleet_Communications_MIN 0x8101
 
/** Wellfleet Communications ethernet protocol type.
*/
#define ETH_P_Wellfleet_Communications_MAX 0x8103
 
/** Symbolics Private ethernet protocol type.
*/
#define ETH_P_Symbolics_Private_MIN 0x8107
 
/** Symbolics Private ethernet protocol type.
*/
#define ETH_P_Symbolics_Private_MAX 0x8109
 
/** Hayes Microcomputers ethernet protocol type.
*/
#define ETH_P_Hayes_Microcomputers 0x8130
 
/** VG Laboratory Systems ethernet protocol type.
*/
#define ETH_P_VG_Laboratory_Systems 0x8131
 
/** Bridge Communications ethernet protocol type.
*/
#define ETH_P_Bridge_Communications_MIN 0x8132
 
/** Bridge Communications ethernet protocol type.
*/
#define ETH_P_Bridge_Communications_MAX 0x8136
 
/** Novell, Inc. ethernet protocol type.
*/
#define ETH_P_Novell_Inc_MIN 0x8137
 
/** Novell, Inc. ethernet protocol type.
*/
#define ETH_P_Novell_Inc_MAX 0x8138
 
/** KTI ethernet protocol type.
*/
#define ETH_P_KTI_MIN 0x8139
 
/** KTI ethernet protocol type.
*/
#define ETH_P_KTI_MAX 0x813D
 
/** Logicraft ethernet protocol type.
*/
#define ETH_P_Logicraft 0x8148
 
/** Network Computing Devices ethernet protocol type.
*/
#define ETH_P_Network_Computing_Devices 0x8149
 
/** Alpha Micro ethernet protocol type.
*/
#define ETH_P_Alpha_Micro 0x814A
 
/** SNMP ethernet protocol type.
*/
#define ETH_P_SNMP 0x814C
 
/** BIIN ethernet protocol type.
*/
#define ETH_P_BIIN 0x814D
 
/** BIIN ethernet protocol type.
*/
#define ETH_P_BIIN2 0x814E
 
/** Technically Elite Concept ethernet protocol type.
*/
#define ETH_P_Technically_Elite_Concept 0x814F
 
/** Rational Corp ethernet protocol type.
*/
#define ETH_P_Rational_Corp 0x8150
 
/** Qualcomm ethernet protocol type.
*/
#define ETH_P_Qualcomm_MIN 0x8151
 
/** Qualcomm ethernet protocol type.
*/
#define ETH_P_Qualcomm_MAX 0x8153
 
/** Computer Protocol Pty Ltd ethernet protocol type.
*/
#define ETH_P_Computer_Protocol_Pty_Ltd_MIN 0x815C
 
/** Computer Protocol Pty Ltd ethernet protocol type.
*/
#define ETH_P_Computer_Protocol_Pty_Ltd_MAX 0x815E
 
/** Charles River Data System ethernet protocol type.
*/
#define ETH_P_Charles_River_Data_System_MIN 0x8164
 
/** Charles River Data System ethernet protocol type.
*/
#define ETH_P_Charles_River_Data_System_MAX 0x8166
 
/** XTP ethernet protocol type.
*/
#define ETH_P_XTP 0x817D
 
/** SGI/Time Warner prop. ethernet protocol type.
*/
#define ETH_P_SGITime_Warner_prop 0x817E
 
/** HIPPI-FP encapsulation ethernet protocol type.
*/
#define ETH_P_HIPPI_FP_encapsulation 0x8180
 
/** STP, HIPPI-ST ethernet protocol type.
*/
#define ETH_P_STP_HIPPI_ST 0x8181
 
/** Reserved for HIPPI-6400 ethernet protocol type.
*/
#define ETH_P_Reserved_for_HIPPI_6400 0x8182
 
/** Reserved for HIPPI-6400 ethernet protocol type.
*/
#define ETH_P_Reserved_for_HIPPI_64002 0x8183
 
/** Silicon Graphics prop. ethernet protocol type.
*/
#define ETH_P_Silicon_Graphics_prop_MIN 0x8184
 
/** Silicon Graphics prop. ethernet protocol type.
*/
#define ETH_P_Silicon_Graphics_prop_MAX 0x818C
 
/** Motorola Computer ethernet protocol type.
*/
#define ETH_P_Motorola_Computer 0x818D
 
/** Qualcomm ethernet protocol type.
*/
#define ETH_P_Qualcomm_MIN2 0x819A
 
/** Qualcomm ethernet protocol type.
*/
#define ETH_P_Qualcomm_MAX2 0x81A3
 
/** ARAI Bunkichi ethernet protocol type.
*/
#define ETH_P_ARAI_Bunkichi 0x81A4
 
/** RAD Network Devices ethernet protocol type.
*/
#define ETH_P_RAD_Network_Devices_MIN 0x81A5
 
/** RAD Network Devices ethernet protocol type.
*/
#define ETH_P_RAD_Network_Devices_MAX 0x81AE
 
/** Xyplex ethernet protocol type.
*/
#define ETH_P_Xyplex_MIN2 0x81B7
 
/** Xyplex ethernet protocol type.
*/
#define ETH_P_Xyplex_MAX2 0x81B9
 
/** Apricot Computers ethernet protocol type.
*/
#define ETH_P_Apricot_Computers_MIN 0x81CC
 
/** Apricot Computers ethernet protocol type.
*/
#define ETH_P_Apricot_Computers_MAX 0x81D5
 
/** Artisoft ethernet protocol type.
*/
#define ETH_P_Artisoft_MIN 0x81D6
 
/** Artisoft ethernet protocol type.
*/
#define ETH_P_Artisoft_MAX 0x81DD
 
/** Polygon ethernet protocol type.
*/
#define ETH_P_Polygon_MIN 0x81E6
 
/** Polygon ethernet protocol type.
*/
#define ETH_P_Polygon_MAX 0x81EF
 
/** Comsat Labs ethernet protocol type.
*/
#define ETH_P_Comsat_Labs_MIN 0x81F0
 
/** Comsat Labs ethernet protocol type.
*/
#define ETH_P_Comsat_Labs_MAX 0x81F2
 
/** SAIC ethernet protocol type.
*/
#define ETH_P_SAIC_MIN 0x81F3
 
/** SAIC ethernet protocol type.
*/
#define ETH_P_SAIC_MAX 0x81F5
 
/** VG Analytical ethernet protocol type.
*/
#define ETH_P_VG_Analytical_MIN 0x81F6
 
/** VG Analytical ethernet protocol type.
*/
#define ETH_P_VG_Analytical_MAX 0x81F8
 
/** Quantum Software ethernet protocol type.
*/
#define ETH_P_Quantum_Software_MIN 0x8203
 
/** Quantum Software ethernet protocol type.
*/
#define ETH_P_Quantum_Software_MAX 0x8205
 
/** Ascom Banking Systems ethernet protocol type.
*/
#define ETH_P_Ascom_Banking_Systems_MIN 0x8221
 
/** Ascom Banking Systems ethernet protocol type.
*/
#define ETH_P_Ascom_Banking_Systems_MAX 0x8222
 
/** Advanced Encryption Syste ethernet protocol type.
*/
#define ETH_P_Advanced_Encryption_Syste_MIN 0x823E
 
/** Advanced Encryption Syste ethernet protocol type.
*/
#define ETH_P_Advanced_Encryption_Syste_MAX 0x8240
 
/** Athena Programming ethernet protocol type.
*/
#define ETH_P_Athena_Programming_MIN 0x827F
 
/** Athena Programming ethernet protocol type.
*/
#define ETH_P_Athena_Programming_MAX 0x8282
 
/** Charles River Data System ethernet protocol type.
*/
#define ETH_P_Charles_River_Data_System_MIN2 0x8263
 
/** Charles River Data System ethernet protocol type.
*/
#define ETH_P_Charles_River_Data_System_MAX2 0x826A
 
/** Inst Ind Info Tech ethernet protocol type.
*/
#define ETH_P_Inst_Ind_Info_Tech_MIN 0x829A
 
/** Inst Ind Info Tech ethernet protocol type.
*/
#define ETH_P_Inst_Ind_Info_Tech_MAX 0x829B
 
/** Taurus Controls ethernet protocol type.
*/
#define ETH_P_Taurus_Controls_MIN 0x829C
 
/** Taurus Controls ethernet protocol type.
*/
#define ETH_P_Taurus_Controls_MAX 0x82AB
 
/** Walker Richer & Quinn ethernet protocol type.
*/
#define ETH_P_Walker_Richer_Quinn_MIN 0x82AC
 
/** Walker Richer & Quinn ethernet protocol type.
*/
#define ETH_P_Walker_Richer_Quinn_MAX 0x8693
 
/** Idea Courier ethernet protocol type.
*/
#define ETH_P_Idea_Courier_MIN 0x8694
 
/** Idea Courier ethernet protocol type.
*/
#define ETH_P_Idea_Courier_MAX 0x869D
 
/** Computer Network Tech ethernet protocol type.
*/
#define ETH_P_Computer_Network_Tech_MIN 0x869E
 
/** Computer Network Tech ethernet protocol type.
*/
#define ETH_P_Computer_Network_Tech_MAX 0x86A1
 
/** Gateway Communications ethernet protocol type.
*/
#define ETH_P_Gateway_Communications_MIN 0x86A3
 
/** Gateway Communications ethernet protocol type.
*/
#define ETH_P_Gateway_Communications_MAX 0x86AC
 
/** SECTRA ethernet protocol type.
*/
#define ETH_P_SECTRA 0x86DB
 
/** Delta Controls ethernet protocol type.
*/
#define ETH_P_Delta_Controls 0x86DE
 
/** IPv6 ethernet protocol type.
*/
#define ETH_P_IPV6 0x86DD
 
/** ATOMIC ethernet protocol type.
*/
#define ETH_P_ATOMIC 0x86DF
 
/** Landis & Gyr Powers ethernet protocol type.
*/
#define ETH_P_Landis_Gyr_Powers_MIN 0x86E0
 
/** Landis & Gyr Powers ethernet protocol type.
*/
#define ETH_P_Landis_Gyr_Powers_MAX 0x86EF
 
/** Motorola ethernet protocol type.
*/
#define ETH_P_Motorola_MIN 0x8700
 
/** Motorola ethernet protocol type.
*/
#define ETH_P_Motorola_MAX 0x8710
 
/** TCP/IP Compression ethernet protocol type.
*/
#define ETH_P_TCPIP_Compression 0x876B
 
/** IP Autonomous Systems ethernet protocol type.
*/
#define ETH_P_IP_Autonomous_Systems 0x876C
 
/** Secure Data ethernet protocol type.
*/
#define ETH_P_Secure_Data 0x876D
 
/** PPP ethernet protocol type.
*/
#define ETH_P_PPP 0x880B
 
/** MPLS ethernet protocol type.
*/
#define ETH_P_MPLS_UC 0x8847
 
/** MPLS with upstream-assigned label ethernet protocol type.
*/
#define ETH_P_MPLS_MC 0x8848
 
/** Invisible Software ethernet protocol type.
*/
#define ETH_P_Invisible_Software_MIN 0x8A96
 
/** Invisible Software ethernet protocol type.
*/
#define ETH_P_Invisible_Software_MAX 0x8A97
 
/** PPPoE Discovery Stage ethernet protocol type.
*/
#define ETH_P_PPP_DISC 0x8863
 
/** PPPoE Session Stage ethernet protocol type.
*/
#define ETH_P_PPP_SES 0x8864
 
/** Loopback ethernet protocol type.
*/
#define ETH_P_Loopback 0x9000
 
/** Com(Bridge) XNS Sys Mgmt ethernet protocol type.
*/
#define ETH_P_Com_XNS_Sys_Mgmt 0x9001
 
/** Com(Bridge) TCP-IP Sys ethernet protocol type.
*/
#define ETH_P_Com_TCP_IP_Sys 0x9002
 
/** Com(Bridge) loop detect ethernet protocol type.
*/
#define ETH_P_Com_loop_detect 0x9003
 
/** BBN VITAL-LanBridge cache ethernet protocol type.
*/
#define ETH_P_BBN_VITAL_LanBridge_cache 0xFF00
 
/** ISC Bunker Ramo ethernet protocol type.
*/
#define ETH_P_ISC_Bunker_Ramo_MIN 0xFF00
 
/** ISC Bunker Ramo ethernet protocol type.
*/
#define ETH_P_ISC_Bunker_Ramo_MAX 0xFF0F
 
#endif
 
/** @}
*/
Property changes:
Added: svn:mergeinfo
/branches/network/uspace/srv/net/include/protocols.h
0,0 → 1,614
/*
* Copyright (c) 2008 Lukas Mejdrech
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* - The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
 
/** @addtogroup net
* @{
*/
 
/** @file
* Internet protocol numbers according to the online IANA - Assigned Protocol numbers - <http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xml>, cited January 14 2009.
* Names according to the linux src/include/linux/in.h header file.
*/
 
#ifndef __NET_IPPROTOCOLS_H__
#define __NET_IPPROTOCOLS_H__
 
/** IPv6 Hop-by-Hop Option interenet protocol number.
*/
#define IPPROTO_HOPOPT 0
 
/** Internet Control Message interenet protocol number.
*/
#define IPPROTO_ICMP 1
 
/** Internet Group Management interenet protocol number.
*/
#define IPPROTO_IGMP 2
 
/** Gateway-to-Gateway interenet protocol number.
*/
#define IPPROTO_GGP 3
 
/** IP in IP (encapsulation) interenet protocol number.
*/
#define IPPROTO_IP 4
 
/** Stream interenet protocol number.
*/
#define IPPROTO_ST 5
 
/** Transmission Control interenet protocol number.
*/
#define IPPROTO_TCP 6
 
/** CBT interenet protocol number.
*/
#define IPPROTO_CBT 7
 
/** Exterior Gateway Protocol interenet protocol number.
*/
#define IPPROTO_EGP 8
 
/** any private interior gateway
(used by Cisco for their IGRP) interenet protocol number.
*/
#define IPPROTO_IGP 9
 
/** BBN RCC Monitoring interenet protocol number.
*/
#define IPPROTO_BBN_RCC_MON 10
 
/** Network Voice Protocol interenet protocol number.
*/
#define IPPROTO_NVP_II 11
 
/** PUP interenet protocol number.
*/
#define IPPROTO_PUP 12
 
/** ARGUS interenet protocol number.
*/
#define IPPROTO_ARGUS 13
 
/** EMCON interenet protocol number.
*/
#define IPPROTO_EMCON 14
 
/** Cross Net Debugger interenet protocol number.
*/
#define IPPROTO_XNET 15
 
/** Chaos interenet protocol number.
*/
#define IPPROTO_CHAOS 16
 
/** User Datagram interenet protocol number.
*/
#define IPPROTO_UDP 17
 
/** Multiplexing interenet protocol number.
*/
#define IPPROTO_MUX 18
 
/** DCN Measurement Subsystems interenet protocol number.
*/
#define IPPROTO_DCN_MEAS 19
 
/** Host Monitoring interenet protocol number.
*/
#define IPPROTO_HMP 20
 
/** Packet Radio Measurement interenet protocol number.
*/
#define IPPROTO_PRM 21
 
/** XEROX NS IDP interenet protocol number.
*/
#define IPPROTO_XNS_IDP 22
 
/** Trunk-1 interenet protocol number.
*/
#define IPPROTO_TRUNK_1 23
 
/** Trunk-2 interenet protocol number.
*/
#define IPPROTO_TRUNK_2 24
 
/** Leaf-1 interenet protocol number.
*/
#define IPPROTO_LEAF_1 25
 
/** Leaf-2 interenet protocol number.
*/
#define IPPROTO_LEAF_2 26
 
/** Reliable Data Protocol interenet protocol number.
*/
#define IPPROTO_RDP 27
 
/** Internet Reliable Transaction interenet protocol number.
*/
#define IPPROTO_IRTP 28
 
/** ISO Transport Protocol Class 4 interenet protocol number.
*/
#define IPPROTO_ISO_TP4 29
 
/** Bulk Data Transfer Protocol interenet protocol number.
*/
#define IPPROTO_NETBLT 30
 
/** MFE Network Services Protocol interenet protocol number.
*/
#define IPPROTO_MFE_NSP 31
 
/** MERIT Internodal Protocol interenet protocol number.
*/
#define IPPROTO_MERIT_INP 32
 
/** Datagram Congestion Control Protocol interenet protocol number.
*/
#define IPPROTO_DCCP 33
 
/** Third Party Connect Protocol interenet protocol number.
*/
#define IPPROTO_3PC 34
 
/** Inter-Domain Policy Routing Protocol interenet protocol number.
*/
#define IPPROTO_IDPR 35
 
/** XTP interenet protocol number.
*/
#define IPPROTO_XTP 36
 
/** Datagram Delivery Protocol interenet protocol number.
*/
#define IPPROTO_DDP 37
 
/** IDPR Control Message Transport Proto interenet protocol number.
*/
#define IPPROTO_IDPR_CMTP 38
 
/** TP++ Transport Protocol interenet protocol number.
*/
#define IPPROTO_TP 39
 
/** IL Transport Protocol interenet protocol number.
*/
#define IPPROTO_IL 40
 
/** Ipv6 interenet protocol number.
*/
#define IPPROTO_IPV6 41
 
/** Source Demand Routing Protocol interenet protocol number.
*/
#define IPPROTO_SDRP 42
 
/** Routing Header for IPv6 interenet protocol number.
*/
#define IPPROTO_IPv6_Route 43
 
/** Fragment Header for IPv6 interenet protocol number.
*/
#define IPPROTO_IPv6_Frag 44
 
/** Inter-Domain Routing Protocol interenet protocol number.
*/
#define IPPROTO_IDRP 45
 
/** Reservation Protocol interenet protocol number.
*/
#define IPPROTO_RSVP 46
 
/** General Routing Encapsulation interenet protocol number.
*/
#define IPPROTO_GRE 47
 
/** Dynamic Source Routing Protocol interenet protocol number.
*/
#define IPPROTO_DSR 48
 
/** BNA interenet protocol number.
*/
#define IPPROTO_BNA 49
 
/** Encap Security Payload interenet protocol number.
*/
#define IPPROTO_ESP 50
 
/** Authentication Header interenet protocol number.
*/
#define IPPROTO_AH 51
 
/** Integrated Net Layer Security TUBA interenet protocol number.
*/
#define IPPROTO_I_NLSP 52
 
/** IP with Encryption interenet protocol number.
*/
#define IPPROTO_SWIPE 53
 
/** NBMA Address Resolution Protocol interenet protocol number.
*/
#define IPPROTO_NARP 54
 
/** IP Mobility interenet protocol number.
*/
#define IPPROTO_MOBILE 55
 
/** Transport Layer Security Protocol
using Kryptonet key management interenet protocol number.
*/
#define IPPROTO_TLSP 56
 
/** SKIP interenet protocol number.
*/
#define IPPROTO_SKIP 57
 
/** ICMP for IPv6 interenet protocol number.
*/
#define IPPROTO_IPv6_ICMP 58
 
/** No Next Header for IPv6 interenet protocol number.
*/
#define IPPROTO_IPv6_NoNxt 59
 
/** Destination Options for IPv6 interenet protocol number.
*/
#define IPPROTO_IPv6_Opts 60
 
/** Any host internal protocol interenet protocol number.
*/
#define IPPROTO_AHIP 61
 
/** CFTP interenet protocol number.
*/
#define IPPROTO_CFTP 62
 
/** Any local network interenet protocol number.
*/
#define IPPROTO_ALN 63
 
/** SATNET and Backroom EXPAK interenet protocol number.
*/
#define IPPROTO_SAT_EXPAK 64
 
/** Kryptolan interenet protocol number.
*/
#define IPPROTO_KRYPTOLAN 65
 
/** MIT Remote Virtual Disk Protocol interenet protocol number.
*/
#define IPPROTO_RVD 66
 
/** Internet Pluribus Packet Core interenet protocol number.
*/
#define IPPROTO_IPPC 67
 
/** Any distributed file system interenet protocol number.
*/
#define IPPROTO_ADFS 68
 
/** SATNET Monitoring interenet protocol number.
*/
#define IPPROTO_SAT_MON 69
 
/** VISA Protocol interenet protocol number.
*/
#define IPPROTO_VISA 70
 
/** Internet Packet Core Utility interenet protocol number.
*/
#define IPPROTO_IPCV 71
 
/** Computer Protocol Network Executive interenet protocol number.
*/
#define IPPROTO_CPNX 72
 
/** Computer Protocol Heart Beat interenet protocol number.
*/
#define IPPROTO_CPHB 73
 
/** Wang Span Network interenet protocol number.
*/
#define IPPROTO_WSN 74
 
/** Packet Video Protocol interenet protocol number.
*/
#define IPPROTO_PVP 75
 
/** Backroom SATNET Monitoring interenet protocol number.
*/
#define IPPROTO_BR_SAT_MON 76
 
/** SUN ND IPPROTOCOL_Temporary interenet protocol number.
*/
#define IPPROTO_SUN_ND 77
 
/** WIDEBAND Monitoring interenet protocol number.
*/
#define IPPROTO_WB_MON 78
 
/** WIDEBAND EXPAK interenet protocol number.
*/
#define IPPROTO_WB_EXPAK 79
 
/** ISO Internet Protocol interenet protocol number.
*/
#define IPPROTO_ISO_IP 80
 
/** VMTP interenet protocol number.
*/
#define IPPROTO_VMTP 81
 
/** SECURE-VMTP interenet protocol number.
*/
#define IPPROTO_SECURE_VMTP 82
 
/** VINES interenet protocol number.
*/
#define IPPROTO_VINES 83
 
/** TTP interenet protocol number.
*/
#define IPPROTO_TTP 84
 
/** NSFNET-IGP interenet protocol number.
*/
#define IPPROTO_NSFNET_IGP 85
 
/** Dissimilar Gateway Protocol interenet protocol number.
*/
#define IPPROTO_DGP 86
 
/** TCF interenet protocol number.
*/
#define IPPROTO_TCF 87
 
/** EIGRP interenet protocol number.
*/
#define IPPROTO_EIGRP 88
 
/** OSPFIGP interenet protocol number.
*/
#define IPPROTO_OSPFIGP 89
 
/** Sprite RPC Protocol interenet protocol number.
*/
#define IPPROTO_Sprite_RPC 90
 
/** Locus Address Resolution Protocol interenet protocol number.
*/
#define IPPROTO_LARP 91
 
/** Multicast Transport Protocol interenet protocol number.
*/
#define IPPROTO_MTP 92
 
/** AX.25 Frames interenet protocol number.
*/
#define IPPROTO_AX25 93
 
/** IP-within-IP Encapsulation Protocol interenet protocol number.
*/
#define IPPROTO_IPIP 94
 
/** Mobile Internetworking Control Pro. interenet protocol number.
*/
#define IPPROTO_MICP 95
 
/** Semaphore Communications Sec. Pro. interenet protocol number.
*/
#define IPPROTO_SCC_SP 96
 
/** Ethernet-within-IP Encapsulation interenet protocol number.
*/
#define IPPROTO_ETHERIP 97
 
/** Encapsulation Header interenet protocol number.
*/
#define IPPROTO_ENCAP 98
 
/** Any private encryption scheme interenet protocol number.
*/
#define IPPROTO_APES 99
 
/** GMTP interenet protocol number.
*/
#define IPPROTO_GMTP 100
 
/** Ipsilon Flow Management Protocol interenet protocol number.
*/
#define IPPROTO_IFMP 101
 
/** PNNI over IP interenet protocol number.
*/
#define IPPROTO_PNNI 102
 
/** Protocol Independent Multicast interenet protocol number.
*/
#define IPPROTO_PIM 103
 
/** ARIS interenet protocol number.
*/
#define IPPROTO_ARIS 104
 
/** SCPS interenet protocol number.
*/
#define IPPROTO_SCPS 105
 
/** QNX interenet protocol number.
*/
#define IPPROTO_QNX 106
 
/** Active Networks interenet protocol number.
*/
#define IPPROTO_AN 107
 
/** IP Payload Compression Protocol interenet protocol number.
*/
#define IPPROTO_IPComp 108
 
/** Sitara Networks Protocol interenet protocol number.
*/
#define IPPROTO_SNP 109
 
/** Compaq Peer Protocol interenet protocol number.
*/
#define IPPROTO_Compaq_Peer 110
 
/** IPX in IP interenet protocol number.
*/
#define IPPROTO_IPX_in_IP 111
 
/** Virtual Router Redundancy Protocol interenet protocol number.
*/
#define IPPROTO_VRRP 112
 
/** PGM Reliable Transport Protocol interenet protocol number.
*/
#define IPPROTO_PGM 113
 
/** Any 0-hop protocol interenet protocol number.
*/
#define IPPROTO_A0HP 114
 
/** Layer Two Tunneling Protocol interenet protocol number.
*/
#define IPPROTO_L2TP 115
 
/** D-II Data Exchange (DDX) interenet protocol number.
*/
#define IPPROTO_DDX 116
 
/** Interactive Agent Transfer Protocol interenet protocol number.
*/
#define IPPROTO_IATP 117
 
/** Schedule Transfer Protocol interenet protocol number.
*/
#define IPPROTO_STP 118
 
/** SpectraLink Radio Protocol interenet protocol number.
*/
#define IPPROTO_SRP 119
 
/** UTI interenet protocol number.
*/
#define IPPROTO_UTI 120
 
/** Simple Message Protocol interenet protocol number.
*/
#define IPPROTO_SMP 121
 
/** SM interenet protocol number.
*/
#define IPPROTO_SM 122
 
/** Performance Transparency Protocol interenet protocol number.
*/
#define IPPROTO_PTP 123
 
/** ISIS over IPv4 interenet protocol number.
*/
#define IPPROTO_ISIS 124
 
/** FIRE interenet protocol number.
*/
#define IPPROTO_FIRE 125
 
/** Combat Radio Transport Protocol interenet protocol number.
*/
#define IPPROTO_CRTP 126
 
/** Combat Radio User Datagram interenet protocol number.
*/
#define IPPROTO_CRUDP 127
 
/** SSCOPMCE interenet protocol number.
*/
#define IPPROTO_SSCOPMCE 128
 
/** IPLT interenet protocol number.
*/
#define IPPROTO_IPLT 129
 
/** Secure Packet Shield interenet protocol number.
*/
#define IPPROTO_SPS 130
 
/** Private IP Encapsulation within IP interenet protocol number.
*/
#define IPPROTO_PIPE 131
 
/** Stream Control Transmission Protocol interenet protocol number.
*/
#define IPPROTO_SCTP 132
 
/** Fibre Channel interenet protocol number.
*/
#define IPPROTO_FC 133
 
/** RSVP-E2E-IGNORE interenet protocol number.
*/
#define IPPROTO_RSVP_E2E_IGNORE 134
 
/** Mobility Header interenet protocol number.
*/
#define IPPROTO_MH 135
 
/** UDPLite interenet protocol number.
*/
#define IPPROTO_UDPLITE 136
 
/** MPLS-in-IP interenet protocol number.
*/
#define IPPROTO_MPLS_in_IP 137
 
/** MANET Protocols interenet protocol number.
*/
#define IPPROTO_manet 138
 
/** Host Identity Protocol interenet protocol number.
*/
#define IPPROTO_HIP 139
 
/** Raw interenet protocol number.
*/
#define IPPROTO_RAW 255
 
/** Maximum interenet protocol number.
*/
#define IPPROTO_MAX ( IPPROTO_RAW + 1 )
 
#endif
 
/** @}
*/
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/branches/network/uspace/srv/net/include/socket.h
0,0 → 1,249
/*
* Copyright (c) 2008 Lukas Mejdrech
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* - The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
 
/** @addtogroup net
* @{
*/
 
/** @file
* Common socket constants.
* Based on the linux src/include/linux/socket.h header file.
*/
 
#ifndef __NET_SOCKET_H__
#define __NET_SOCKET_H__
 
/* Supported address families. */
/** Unspecified address family.
*/
#define AF_UNSPEC 0
 
/** Unix domain sockets address family.
*/
#define AF_UNIXL 1
 
/** POSIX name for AF_UNIX address family.
*/
#define AF_LOCAL 1
 
/** Internet IP Protocol address family.
*/
#define AF_INET 2
 
/** Amateur Radio AX.25 address family.
*/
#define AF_AX25 3
 
/** Novell IPX address family.
*/
#define AF_IPX 4
 
/** AppleTalk DDP address family.
*/
#define AF_APPLETALK 5
 
/** Amateur Radio NET/ROM address family.
*/
#define AF_NETROM 6
 
/** Multiprotocol bridge address family.
*/
#define AF_BRIDGE 7
 
/** ATM PVCs address family.
*/
#define AF_ATMPVC 8
 
/** Reserved for X.25 project address family.
*/
#define AF_X25 9
 
/** IP version 6 address family.
*/
#define AF_INET6 10
 
/** Amateur Radio X.25 PLP address family.
*/
#define AF_ROSE 11
 
/** Reserved for DECnet project address family.
*/
#define AF_DECnet 12
 
/** Reserved for 802.2LLC project address family.
*/
#define AF_NETBEUI 13
 
/** Security callback pseudo AF address family.
*/
#define AF_SECURITY 14
 
/** PF_KEY key management API address family.
*/
#define AF_KEY 15
 
/** Alias to emulate 4.4BSD address family.
*/
#define AF_NETLINK 16
 
/** Packet family address family.
*/
#define AF_PACKET 17
 
/** Ash address family.
*/
#define AF_ASH 18
 
/** Acorn Econet address family.
*/
#define AF_ECONET 19
 
/** ATM SVCs address family.
*/
#define AF_ATMSVC 20
 
/** Linux SNA Project (nutters!) address family.
*/
#define AF_SNA 22
 
/** IRDA sockets address family.
*/
#define AF_IRDA 23
 
/** PPPoX sockets address family.
*/
#define AF_PPPOX 24
 
/** Wanpipe API Sockets address family.
*/
#define AF_WANPIPE 25
 
/** Linux LLC address family.
*/
#define AF_LLC 26
 
/** Controller Area Network address family.
*/
#define AF_CAN 29
 
/** TIPC sockets address family.
*/
#define AF_TIPC 30
 
/** Bluetooth sockets address family.
*/
#define AF_BLUETOOTH 31
 
/** IUCV sockets address family.
*/
#define AF_IUCV 32
 
/** RxRPC sockets address family.
*/
#define AF_RXRPC 33
 
/** Maximum address family.
*/
#define AF_MAX 34
 
/* Protocol families, same as address families. */
/*
#define PF_UNSPEC AF_UNSPEC
#define PF_UNIX AF_UNIX
#define PF_LOCAL AF_LOCAL
#define PF_INET AF_INET
#define PF_AX25 AF_AX25
#define PF_IPX AF_IPX
#define PF_APPLETALK AF_APPLETALK
#define PF_NETROM AF_NETROM
#define PF_BRIDGE AF_BRIDGE
#define PF_ATMPVC AF_ATMPVC
#define PF_X25 AF_X25
#define PF_INET6 AF_INET6
#define PF_ROSE AF_ROSE
#define PF_DECnet AF_DECnet
#define PF_NETBEUI AF_NETBEUI
#define PF_SECURITY AF_SECURITY
#define PF_KEY AF_KEY
#define PF_NETLINK AF_NETLINK
#define PF_ROUTE AF_ROUTE
#define PF_PACKET AF_PACKET
#define PF_ASH AF_ASH
#define PF_ECONET AF_ECONET
#define PF_ATMSVC AF_ATMSVC
#define PF_SNA AF_SNA
#define PF_IRDA AF_IRDA
#define PF_PPPOX AF_PPPOX
#define PF_WANPIPE AF_WANPIPE
#define PF_LLC AF_LLC
#define PF_CAN AF_CAN
#define PF_TIPC AF_TIPC
#define PF_BLUETOOTH AF_BLUETOOTH
#define PF_IUCV AF_IUCV
#define PF_RXRPC AF_RXRPC
#define PF_MAX AF_MAX
*/
/* Setsockoptions(2) level. Thanks to BSD these must match IPPROTO_xxx */
/*#define SOL_IP 0
#define SOL_ICMP 1
#define SOL_TCP 6
#define SOL_UDP 17
#define SOL_IPV6 41
#define SOL_ICMPV6 58
#define SOL_SCTP 132
#define SOL_UDPLITE 136 *//* UDP-Lite (RFC 3828) */
/*#define SOL_RAW 255
#define SOL_IPX 256
#define SOL_AX25 257
#define SOL_ATALK 258
#define SOL_NETROM 259
#define SOL_ROSE 260
#define SOL_DECNET 261
#define SOL_X25 262
#define SOL_PACKET 263
#define SOL_ATM 264 *//* ATM layer (cell level) */
/*#define SOL_AAL 265 *//* ATM Adaption Layer (packet level) */
/*#define SOL_IRDA 266
#define SOL_NETBEUI 267
#define SOL_LLC 268
#define SOL_DCCP 269
#define SOL_NETLINK 270
#define SOL_TIPC 271
#define SOL_RXRPC 272
#define SOL_PPPOL2TP 273
#define SOL_BLUETOOTH 274
*/
//
/** IPX options.
// */
//#define IPX_TYPE 1
 
#endif
 
/** @}
*/
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property