Subversion Repositories HelenOS

Rev

Rev 4243 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. /*
  2.  * Copyright (c) 2008 Lukas Mejdrech
  3.  * All rights reserved.
  4.  *
  5.  * Redistribution and use in source and binary forms, with or without
  6.  * modification, are permitted provided that the following conditions
  7.  * are met:
  8.  *
  9.  * - Redistributions of source code must retain the above copyright
  10.  *   notice, this list of conditions and the following disclaimer.
  11.  * - Redistributions in binary form must reproduce the above copyright
  12.  *   notice, this list of conditions and the following disclaimer in the
  13.  *   documentation and/or other materials provided with the distribution.
  14.  * - The name of the author may not be used to endorse or promote products
  15.  *   derived from this software without specific prior written permission.
  16.  *
  17.  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  18.  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  19.  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  20.  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  21.  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  22.  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  23.  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  24.  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  25.  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  26.  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  27.  */
  28.  
  29. /** @addtogroup net
  30.  *  @{
  31.  */
  32.  
  33. /** @file
  34.  *  Common socket constants.
  35.  *  Based on the linux src/include/linux/socket.h header file.
  36.  */
  37.  
  38. #ifndef __NET_SOCKET_H__
  39. #define __NET_SOCKET_H__
  40.  
  41. /* Supported address families. */
  42. /** Unspecified address family.
  43.  */
  44. #define AF_UNSPEC   0
  45.  
  46. /** Unix domain sockets address family.
  47.  */
  48. #define AF_UNIXL    1
  49.  
  50. /** POSIX name for AF_UNIX address family.
  51.  */
  52. #define AF_LOCAL    1
  53.  
  54. /** Internet IP Protocol address family.
  55.  */
  56. #define AF_INET     2
  57.  
  58. /** Amateur Radio AX.25 address family.
  59.  */
  60. #define AF_AX25     3
  61.  
  62. /** Novell IPX address family.
  63.  */
  64. #define AF_IPX      4
  65.  
  66. /** AppleTalk DDP address family.
  67.  */
  68. #define AF_APPLETALK    5
  69.  
  70. /** Amateur Radio NET/ROM address family.
  71.  */
  72. #define AF_NETROM   6
  73.  
  74. /** Multiprotocol bridge address family.
  75.  */
  76. #define AF_BRIDGE   7
  77.  
  78. /** ATM PVCs address family.
  79.  */
  80. #define AF_ATMPVC   8
  81.  
  82. /** Reserved for X.25 project address family.
  83.  */
  84. #define AF_X25      9
  85.  
  86. /** IP version 6 address family.
  87.  */
  88. #define AF_INET6    10
  89.  
  90. /** Amateur Radio X.25 PLP address family.
  91.  */
  92. #define AF_ROSE     11
  93.  
  94. /** Reserved for DECnet project address family.
  95.  */
  96. #define AF_DECnet   12
  97.  
  98. /** Reserved for 802.2LLC project address family.
  99.  */
  100. #define AF_NETBEUI  13
  101.  
  102. /** Security callback pseudo AF address family.
  103.  */
  104. #define AF_SECURITY 14
  105.  
  106. /** PF_KEY key management API address family.
  107.  */
  108. #define AF_KEY      15
  109.  
  110. /** Alias to emulate 4.4BSD address family.
  111.  */
  112. #define AF_NETLINK  16
  113.  
  114. /** Packet family address family.
  115.  */
  116. #define AF_PACKET   17
  117.  
  118. /** Ash address family.
  119.  */
  120. #define AF_ASH      18
  121.  
  122. /** Acorn Econet address family.
  123.  */
  124. #define AF_ECONET   19
  125.  
  126. /** ATM SVCs address family.
  127.  */
  128. #define AF_ATMSVC   20
  129.  
  130. /** Linux SNA Project (nutters!) address family.
  131.  */
  132. #define AF_SNA      22
  133.  
  134. /** IRDA sockets address family.
  135.  */
  136. #define AF_IRDA     23
  137.  
  138. /** PPPoX sockets address family.
  139.  */
  140. #define AF_PPPOX    24
  141.  
  142. /** Wanpipe API Sockets address family.
  143.  */
  144. #define AF_WANPIPE  25
  145.  
  146. /** Linux LLC address family.
  147.  */
  148. #define AF_LLC      26
  149.  
  150. /** Controller Area Network address family.
  151.  */
  152. #define AF_CAN      29
  153.  
  154. /** TIPC sockets address family.
  155.  */
  156. #define AF_TIPC     30
  157.  
  158. /** Bluetooth sockets address family.
  159.  */
  160. #define AF_BLUETOOTH    31
  161.  
  162. /** IUCV sockets address family.
  163.  */
  164. #define AF_IUCV     32
  165.  
  166. /** RxRPC sockets address family.
  167.  */
  168. #define AF_RXRPC    33
  169.  
  170. /** Maximum address family.
  171.  */
  172. #define AF_MAX      34
  173.  
  174. /* Protocol families, same as address families. */
  175. /*
  176. #define PF_UNSPEC   AF_UNSPEC
  177. #define PF_UNIX     AF_UNIX
  178. #define PF_LOCAL    AF_LOCAL
  179. #define PF_INET     AF_INET
  180. #define PF_AX25     AF_AX25
  181. #define PF_IPX      AF_IPX
  182. #define PF_APPLETALK    AF_APPLETALK
  183. #define PF_NETROM   AF_NETROM
  184. #define PF_BRIDGE   AF_BRIDGE
  185. #define PF_ATMPVC   AF_ATMPVC
  186. #define PF_X25      AF_X25
  187. #define PF_INET6    AF_INET6
  188. #define PF_ROSE     AF_ROSE
  189. #define PF_DECnet   AF_DECnet
  190. #define PF_NETBEUI  AF_NETBEUI
  191. #define PF_SECURITY AF_SECURITY
  192. #define PF_KEY      AF_KEY
  193. #define PF_NETLINK  AF_NETLINK
  194. #define PF_ROUTE    AF_ROUTE
  195. #define PF_PACKET   AF_PACKET
  196. #define PF_ASH      AF_ASH
  197. #define PF_ECONET   AF_ECONET
  198. #define PF_ATMSVC   AF_ATMSVC
  199. #define PF_SNA      AF_SNA
  200. #define PF_IRDA     AF_IRDA
  201. #define PF_PPPOX    AF_PPPOX
  202. #define PF_WANPIPE  AF_WANPIPE
  203. #define PF_LLC      AF_LLC
  204. #define PF_CAN      AF_CAN
  205. #define PF_TIPC     AF_TIPC
  206. #define PF_BLUETOOTH    AF_BLUETOOTH
  207. #define PF_IUCV     AF_IUCV
  208. #define PF_RXRPC    AF_RXRPC
  209. #define PF_MAX      AF_MAX
  210. */
  211. /* Setsockoptions(2) level. Thanks to BSD these must match IPPROTO_xxx */
  212. /*#define SOL_IP        0
  213. #define SOL_ICMP    1
  214. #define SOL_TCP     6
  215. #define SOL_UDP     17
  216. #define SOL_IPV6    41
  217. #define SOL_ICMPV6  58
  218. #define SOL_SCTP    132
  219. #define SOL_UDPLITE 136     *//* UDP-Lite (RFC 3828) */
  220. /*#define SOL_RAW       255
  221. #define SOL_IPX     256
  222. #define SOL_AX25    257
  223. #define SOL_ATALK   258
  224. #define SOL_NETROM  259
  225. #define SOL_ROSE    260
  226. #define SOL_DECNET  261
  227. #define SOL_X25     262
  228. #define SOL_PACKET  263
  229. #define SOL_ATM     264 *//* ATM layer (cell level) */
  230. /*#define SOL_AAL       265 *//* ATM Adaption Layer (packet level) */
  231. /*#define SOL_IRDA        266
  232. #define SOL_NETBEUI 267
  233. #define SOL_LLC     268
  234. #define SOL_DCCP    269
  235. #define SOL_NETLINK 270
  236. #define SOL_TIPC    271
  237. #define SOL_RXRPC   272
  238. #define SOL_PPPOL2TP    273
  239. #define SOL_BLUETOOTH   274
  240. */
  241. //
  242. /** IPX options.
  243. // */
  244. //#define IPX_TYPE  1
  245.  
  246. #endif
  247.  
  248. /** @}
  249.  */
  250.