Changeset c0e74b1 in mainline for uspace/lib
- Timestamp:
- 2010-10-06T22:58:18Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ae972834
- Parents:
- 49d871ea (diff), d9e2e0e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- uspace/lib
- Files:
-
- 8 added
- 8 deleted
- 35 edited
- 6 moved
-
c/Makefile (modified) (1 diff)
-
c/generic/net/inet.c (added)
-
c/generic/net/modules.c (added)
-
c/generic/net/socket_client.c (added)
-
c/generic/net/socket_parse.c (moved) (moved from uspace/lib/socket/generic/socket_parse.c ) (1 diff)
-
c/include/byteorder.h (modified) (1 diff)
-
c/include/ipc/net.h (added)
-
c/include/ipc/socket.h (moved) (moved from uspace/lib/socket/include/socket_messages.h ) (2 diffs)
-
c/include/net/in.h (moved) (moved from uspace/lib/socket/include/in.h ) (2 diffs)
-
c/include/net/in6.h (moved) (moved from uspace/lib/socket/include/in6.h ) (2 diffs)
-
c/include/net/inet.h (moved) (moved from uspace/lib/socket/include/net_byteorder.h ) (1 diff)
-
c/include/net/ip_protocols.h (added)
-
c/include/net/modules.h (added)
-
c/include/net/socket.h (added)
-
c/include/net/socket_codes.h (added)
-
c/include/net/socket_parse.h (moved) (moved from uspace/lib/socket/include/socket_parse.h )
-
net/adt/module_map.c (modified) (1 diff)
-
net/generic/net_remote.c (modified) (1 diff)
-
net/il/arp_remote.c (modified) (1 diff)
-
net/il/ip_remote.c (modified) (1 diff)
-
net/include/adt/module_map.h (modified) (1 diff)
-
net/include/arp_messages.h (modified) (1 diff)
-
net/include/icmp_header.h (modified) (1 diff)
-
net/include/icmp_interface.h (modified) (2 diffs)
-
net/include/il_messages.h (modified) (1 diff)
-
net/include/ip_client.h (modified) (2 diffs)
-
net/include/ip_interface.h (modified) (2 diffs)
-
net/include/ip_local.h (modified) (1 diff)
-
net/include/ip_messages.h (modified) (1 diff)
-
net/include/ip_remote.h (modified) (1 diff)
-
net/include/net_net_messages.h (modified) (1 diff)
-
net/include/netif_messages.h (modified) (1 diff)
-
net/include/nil_messages.h (modified) (1 diff)
-
net/include/tl_common.h (modified) (1 diff)
-
net/include/tl_messages.h (modified) (1 diff)
-
net/netif/netif_local.c (modified) (1 diff)
-
net/netif/netif_nil_bundle.c (modified) (1 diff)
-
net/netif/netif_remote.c (modified) (2 diffs)
-
net/tl/icmp_remote.c (modified) (1 diff)
-
net/tl/tl_common.c (modified) (2 diffs)
-
socket/Makefile (modified) (1 diff)
-
socket/generic/icmp_api.c (modified) (2 diffs)
-
socket/generic/icmp_common.c (modified) (1 diff)
-
socket/generic/inet.c (deleted)
-
socket/generic/net_modules.c (deleted)
-
socket/generic/socket_client.c (deleted)
-
socket/generic/socket_core.c (modified) (2 diffs)
-
socket/include/icmp_api.h (modified) (2 diffs)
-
socket/include/icmp_messages.h (modified) (1 diff)
-
socket/include/inet.h (deleted)
-
socket/include/ip_protocols.h (deleted)
-
socket/include/net_messages.h (modified) (2 diffs)
-
socket/include/net_modules.h (deleted)
-
socket/include/packet/packet_messages.h (modified) (1 diff)
-
socket/include/socket.h (deleted)
-
socket/include/socket_codes.h (deleted)
-
socket/include/socket_core.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/Makefile
r49d871ea rc0e74b1 99 99 generic/vfs/vfs.c \ 100 100 generic/vfs/canonify.c \ 101 generic/net/inet.c \ 102 generic/net/modules.c \ 103 generic/net/socket_client.c \ 104 generic/net/socket_parse.c \ 101 105 generic/stacktrace.c \ 102 106 generic/arg_parse.c \ -
uspace/lib/c/generic/net/socket_parse.c
r49d871ea rc0e74b1 35 35 */ 36 36 37 #include <socket_parse.h> 37 #include <net/socket_parse.h> 38 #include <net/socket.h> 38 39 #include <arg_parse.h> 39 40 #include <errno.h> 40 41 #include <str.h> 41 #include <socket.h>42 42 43 43 /** Translate the character string to the address family number. -
uspace/lib/c/include/byteorder.h
r49d871ea rc0e74b1 80 80 #endif 81 81 82 #define htons(n) host2uint16_t_be((n)) 83 #define htonl(n) host2uint32_t_be((n)) 84 #define ntohs(n) uint16_t_be2host((n)) 85 #define ntohl(n) uint32_t_be2host((n)) 86 82 87 static inline uint64_t uint64_t_byteorder_swap(uint64_t n) 83 88 { -
uspace/lib/c/include/ipc/socket.h
r49d871ea rc0e74b1 27 27 */ 28 28 29 /** @addtogroup socket30 * @{29 /** @addtogroup libc 30 * @{ 31 31 */ 32 32 33 33 /** @file 34 * Socket messages. 35 * @see socket.h 36 */ 37 38 39 #ifndef __NET_SOCKET_MESSAGES_H__ 40 #define __NET_SOCKET_MESSAGES_H__ 34 * Socket messages. 35 */ 36 37 #ifndef LIBC_SOCKET_MESSAGES_H_ 38 #define LIBC_SOCKET_MESSAGES_H_ 41 39 42 40 #include <ipc/ipc.h> 43 44 #include <net_messages.h> 45 #include <socket_codes.h> 46 47 /** Socket client messages. 48 */ 49 typedef enum{ 50 /** Creates a new socket. 51 * @see socket() 52 */ 41 #include <ipc/net.h> 42 43 /** Socket client messages. */ 44 typedef enum { 45 /** Creates a new socket. @see socket() */ 53 46 NET_SOCKET = NET_SOCKET_FIRST, 54 /** Binds the socket. 55 * @see bind() 56 */ 47 /** Binds the socket. @see bind() */ 57 48 NET_SOCKET_BIND, 58 /** Creates a new socket. 59 * @see socket() 60 */ 49 /** Creates a new socket. @see socket() */ 61 50 NET_SOCKET_LISTEN, 62 /** Accepts an incomming connection. 63 * @see accept() 64 */ 51 /** Accepts an incomming connection. @see accept() */ 65 52 NET_SOCKET_ACCEPT, 66 /** Connects the socket. 67 * @see connect() 68 */ 53 /** Connects the socket. @see connect() */ 69 54 NET_SOCKET_CONNECT, 70 /** Closes the socket. 71 * @see closesocket() 72 */ 55 /** Closes the socket. @see closesocket() */ 73 56 NET_SOCKET_CLOSE, 74 /** Sends data via the stream socket. 75 * @see send() 76 */ 57 /** Sends data via the stream socket. @see send() */ 77 58 NET_SOCKET_SEND, 78 /** Sends data via the datagram socket. 79 * @see sendto() 80 */ 59 /** Sends data via the datagram socket. @see sendto() */ 81 60 NET_SOCKET_SENDTO, 82 /** Receives data from the stream socket. 83 * @see socket() 84 */ 61 /** Receives data from the stream socket. @see socket() */ 85 62 NET_SOCKET_RECV, 86 /** Receives data from the datagram socket. 87 * @see socket() 88 */ 63 /** Receives data from the datagram socket. @see socket() */ 89 64 NET_SOCKET_RECVFROM, 90 /** Gets the socket option. 91 * @see getsockopt() 92 */ 65 /** Gets the socket option. @see getsockopt() */ 93 66 NET_SOCKET_GETSOCKOPT, 94 /** Sets the socket option. 95 * @see setsockopt() 96 */ 67 /** Sets the socket option. @see setsockopt() */ 97 68 NET_SOCKET_SETSOCKOPT, 98 /** New socket for acceptence notification message. 99 */ 69 /** New socket for acceptence notification message. */ 100 70 NET_SOCKET_ACCEPTED, 101 /** New data received notification message. 102 */ 71 /** New data received notification message. */ 103 72 NET_SOCKET_RECEIVED, 104 /** New socket data fragment size notification message. 105 */ 73 /** New socket data fragment size notification message. */ 106 74 NET_SOCKET_DATA_FRAGMENT_SIZE 107 75 } socket_messages; … … 112 80 113 81 /** Sets the socket identifier in the message answer. 114 * @param[out] answerThe message answer structure.82 * @param[out] answer The message answer structure. 115 83 */ 116 84 #define SOCKET_SET_SOCKET_ID(answer, value) \ 117 {ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG1(answer, argument);} 85 do { \ 86 ipcarg_t argument = (ipcarg_t) (value); \ 87 IPC_SET_ARG1(answer, argument); \ 88 } while (0) 118 89 119 90 /** Returns the socket identifier message parameter. 120 * @param[in] callThe message call structure.91 * @param[in] call The message call structure. 121 92 */ 122 93 #define SOCKET_GET_SOCKET_ID(call) \ 123 ({int socket_id = (int) IPC_GET_ARG1(call); socket_id;}) 94 ({ \ 95 int socket_id = (int) IPC_GET_ARG1(call); \ 96 socket_id; \ 97 }) 124 98 125 99 /** Sets the read data length in the message answer. 126 * @param[out] answerThe message answer structure.100 * @param[out] answer The message answer structure. 127 101 */ 128 102 #define SOCKET_SET_READ_DATA_LENGTH(answer, value) \ 129 {ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG1(answer, argument);} 103 do { \ 104 ipcarg_t argument = (ipcarg_t) (value); \ 105 IPC_SET_ARG1(answer, argument); \ 106 } while (0) 130 107 131 108 /** Returns the read data length message parameter. 132 * @param[in] callThe message call structure.109 * @param[in] call The message call structure. 133 110 */ 134 111 #define SOCKET_GET_READ_DATA_LENGTH(call) \ 135 ({int data_length = (int) IPC_GET_ARG1(call); data_length;}) 112 ({ \ 113 int data_length = (int) IPC_GET_ARG1(call); \ 114 data_length; \ 115 }) 136 116 137 117 /** Returns the backlog message parameter. 138 * @param[in] callThe message call structure.118 * @param[in] call The message call structure. 139 119 */ 140 120 #define SOCKET_GET_BACKLOG(call) \ 141 ({int backlog = (int) IPC_GET_ARG2(call); backlog;}) 121 ({ \ 122 int backlog = (int) IPC_GET_ARG2(call); \ 123 backlog; \ 124 }) 142 125 143 126 /** Returns the option level message parameter. 144 * @param[in] callThe message call structure.127 * @param[in] call The message call structure. 145 128 */ 146 129 #define SOCKET_GET_OPT_LEVEL(call) \ 147 ({int opt_level = (int) IPC_GET_ARG2(call); opt_level;}) 130 ({ \ 131 int opt_level = (int) IPC_GET_ARG2(call); \ 132 opt_level; \ 133 }) 148 134 149 135 /** Returns the data fragment size message parameter. 150 * @param[in] callThe message call structure.136 * @param[in] call The message call structure. 151 137 */ 152 138 #define SOCKET_GET_DATA_FRAGMENT_SIZE(call) \ 153 ({size_t size = (size_t) IPC_GET_ARG2(call); size;}) 139 ({ \ 140 size_t size = (size_t) IPC_GET_ARG2(call); \ 141 size; \ 142 }) 154 143 155 144 /** Sets the data fragment size in the message answer. 156 * @param[out] answerThe message answer structure.145 * @param[out] answer The message answer structure. 157 146 */ 158 147 #define SOCKET_SET_DATA_FRAGMENT_SIZE(answer, value) \ 159 {ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG2(answer, argument);} 148 do { \ 149 ipcarg_t argument = (ipcarg_t) (value); \ 150 IPC_SET_ARG2(answer, argument); \ 151 } while (0) 160 152 161 153 /** Sets the address length in the message answer. 162 * @param[out] answerThe message answer structure.154 * @param[out] answer The message answer structure. 163 155 */ 164 156 #define SOCKET_SET_ADDRESS_LENGTH(answer, value) \ 165 {ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG3(answer, argument);} 157 do { \ 158 ipcarg_t argument = (ipcarg_t) (value); \ 159 IPC_SET_ARG3(answer, argument);\ 160 } while (0) 166 161 167 162 /** Returns the address length message parameter. 168 * @param[in] callThe message call structure.163 * @param[in] call The message call structure. 169 164 */ 170 165 #define SOCKET_GET_ADDRESS_LENGTH(call) \ 171 ({socklen_t address_length = (socklen_t) IPC_GET_ARG3(call); address_length;}) 166 ({ \ 167 socklen_t address_length = (socklen_t) IPC_GET_ARG3(call); \ 168 address_length; \ 169 }) 172 170 173 171 /** Sets the header size in the message answer. 174 * @param[out] answerThe message answer structure.172 * @param[out] answer The message answer structure. 175 173 */ 176 174 #define SOCKET_SET_HEADER_SIZE(answer, value) \ 177 \ 178 {ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG3(answer, argument);} 175 do { \ 176 ipcarg_t argument = (ipcarg_t) (value); \ 177 IPC_SET_ARG3(answer, argument); \ 178 } while (0) 179 179 180 180 /** Returns the header size message parameter. 181 * @param[in] call The message call structure.181 * @param[in] call The message call structure. 182 182 */ 183 183 #define SOCKET_GET_HEADER_SIZE(call) \ 184 ({size_t size = (size_t) IPC_GET_ARG3(call); size;}) 184 ({ \ 185 size_t size = (size_t) IPC_GET_ARG3(call); \ 186 size; \ 187 }) 185 188 186 189 /** Returns the flags message parameter. 187 * @param[in] call The message call structure.190 * @param[in] call The message call structure. 188 191 */ 189 192 #define SOCKET_GET_FLAGS(call) \ 190 ({int flags = (int) IPC_GET_ARG4(call); flags;}) 193 ({ \ 194 int flags = (int) IPC_GET_ARG4(call); \ 195 flags; \ 196 }) 191 197 192 198 /** Returns the option name message parameter. 193 * @param[in] call The message call structure.199 * @param[in] call The message call structure. 194 200 */ 195 201 #define SOCKET_GET_OPT_NAME(call) \ 196 ({int opt_name = (int) IPC_GET_ARG4(call); opt_name;}) 202 ({ \ 203 int opt_name = (int) IPC_GET_ARG4(call); \ 204 opt_name; \ 205 }) 197 206 198 207 /** Returns the data fragments message parameter. 199 * @param[in] call The message call structure.208 * @param[in] call The message call structure. 200 209 */ 201 210 #define SOCKET_GET_DATA_FRAGMENTS(call) \ 202 ({int fragments = (int) IPC_GET_ARG5(call); fragments;}) 211 ({ \ 212 int fragments = (int) IPC_GET_ARG5(call); \ 213 fragments; \ 214 }) 203 215 204 216 /** Returns the new socket identifier message parameter. 205 * @param[in] call The message call structure.217 * @param[in] call The message call structure. 206 218 */ 207 219 #define SOCKET_GET_NEW_SOCKET_ID(call) \ 208 ({int socket_id = (int) IPC_GET_ARG5(call); socket_id;}) 220 ({ \ 221 int socket_id = (int) IPC_GET_ARG5(call); \ 222 socket_id; \ 223 }) 209 224 210 225 /*@}*/ -
uspace/lib/c/include/net/in.h
r49d871ea rc0e74b1 27 27 */ 28 28 29 /** @addtogroup net29 /** @addtogroup libc 30 30 * @{ 31 31 */ … … 35 35 */ 36 36 37 #ifndef __NET_IN_H__38 #define __NET_IN_H__37 #ifndef LIBC_IN_H_ 38 #define LIBC_IN_H_ 39 39 40 #include <net/inet.h> 41 #include <net/ip_protocols.h> 40 42 #include <sys/types.h> 41 43 42 #include <ip_protocols.h> 43 #include <inet.h> 44 45 /** INET string address maximum length. 46 */ 44 /** INET string address maximum length. */ 47 45 #define INET_ADDRSTRLEN (4 * 3 + 3 + 1) 48 46 49 47 /** Type definition of the INET address. 50 * @see in_addr48 * @see in_addr 51 49 */ 52 50 typedef struct in_addr in_addr_t; 53 51 54 52 /** Type definition of the INET socket address. 55 * @see sockaddr_in53 * @see sockaddr_in 56 54 */ 57 55 typedef struct sockaddr_in sockaddr_in_t; 58 56 59 /** INET address. 60 */ 61 struct in_addr{ 62 /** 4 byte IP address. 63 */ 57 /** INET address. */ 58 struct in_addr { 59 /** 4 byte IP address. */ 64 60 uint32_t s_addr; 65 61 }; 66 62 67 63 /** INET socket address. 68 * @see sockaddr64 * @see sockaddr 69 65 */ 70 struct sockaddr_in{ 71 /** Address family. 72 * Should be AF_INET. 73 */ 66 struct sockaddr_in { 67 /** Address family. Should be AF_INET. */ 74 68 uint16_t sin_family; 75 /** Port number. 76 */ 69 /** Port number. */ 77 70 uint16_t sin_port; 78 /** Internet address. 79 */ 71 /** Internet address. */ 80 72 struct in_addr sin_addr; 81 /** Padding to meet the sockaddr size. 82 */ 73 /** Padding to meet the sockaddr size. */ 83 74 uint8_t sin_zero[8]; 84 75 }; -
uspace/lib/c/include/net/in6.h
r49d871ea rc0e74b1 27 27 */ 28 28 29 /** @addtogroup net29 /** @addtogroup libc 30 30 * @{ 31 31 */ … … 35 35 */ 36 36 37 #ifndef __NET_IN6_H__38 #define __NET_IN6_H__37 #ifndef LIBC_IN6_H_ 38 #define LIBC_IN6_H_ 39 39 40 #include <net/inet.h> 41 #include <net/ip_protocols.h> 40 42 #include <sys/types.h> 41 43 42 #include <ip_protocols.h> 43 #include <inet.h> 44 45 /** INET6 string address maximum length. 46 */ 44 /** INET6 string address maximum length. */ 47 45 #define INET6_ADDRSTRLEN (8 * 4 + 7 + 1) 48 46 49 47 /** Type definition of the INET6 address. 50 * @see in6_addr48 * @see in6_addr 51 49 */ 52 50 typedef struct in6_addr in6_addr_t; 53 51 54 52 /** Type definition of the INET6 socket address. 55 * @see sockaddr_in653 * @see sockaddr_in6 56 54 */ 57 55 typedef struct sockaddr_in6 sockaddr_in6_t; 58 56 59 /** INET6 address. 60 */ 61 struct in6_addr{ 62 /** 16 byte IPv6 address. 63 */ 57 /** INET6 address. */ 58 struct in6_addr { 59 /** 16 byte IPv6 address. */ 64 60 unsigned char s6_addr[16]; 65 61 }; 66 62 67 63 /** INET6 socket address. 68 * @see sockaddr64 * @see sockaddr 69 65 */ 70 struct sockaddr_in6{ 71 /** Address family. 72 * Should be AF_INET6. 73 */ 66 struct sockaddr_in6 { 67 /** Address family. Should be AF_INET6. */ 74 68 uint16_t sin6_family; 75 /** Port number. 76 */ 69 /** Port number. */ 77 70 uint16_t sin6_port; 78 /** IPv6 flow information. 79 */ 71 /** IPv6 flow information. */ 80 72 uint32_t sin6_flowinfo; 81 /** IPv6 address. 82 */ 73 /** IPv6 address. */ 83 74 struct in6_addr sin6_addr; 84 /** Scope identifier. 85 */ 75 /** Scope identifier. */ 86 76 uint32_t sin6_scope_id; 87 77 }; -
uspace/lib/c/include/net/inet.h
r49d871ea rc0e74b1 27 27 */ 28 28 29 /** @addtogroup net29 /** @addtogroup libc 30 30 * @{ 31 31 */ 32 32 33 33 /** @file 34 * Host - network byte order manipulation functions.34 * Internet common definitions. 35 35 */ 36 36 37 #ifndef __NET_BYTEORDER_H__38 #define __NET_BYTEORDER_H__37 #ifndef LIBC_INET_H_ 38 #define LIBC_INET_H_ 39 39 40 #include <sys/types.h> 40 41 #include <byteorder.h> 41 #include <sys/types.h>42 42 43 /** Type definition of the socket address. 44 * @see sockaddr 45 */ 46 typedef struct sockaddr sockaddr_t; 43 47 44 /** Converts the given short number (16 bit) from the host byte order to the network byte order (big endian). 45 * @param[in] number The number in the host byte order to be converted. 46 * @returns The number in the network byte order. 48 /** Type definition of the address information. 49 * @see addrinfo 47 50 */ 48 #define htons(number) host2uint16_t_be(number) 51 typedef struct addrinfo addrinfo_t; 49 52 50 /** Converts the given long number (32 bit) from the host byte order to the network byte order (big endian). 51 * @param[in] number The number in the host byte order to be converted. 52 * @returns The number in the network byte order. 53 */ 54 #define htonl(number) host2uint32_t_be(number) 53 /** Socket address. */ 54 struct sockaddr { 55 /** Address family. @see socket.h */ 56 uint16_t sa_family; 57 /** 14 byte protocol address. */ 58 uint8_t sa_data[14]; 59 }; 55 60 56 /** Converts the given short number (16 bit) from the network byte order (big endian) to the host byte order. 57 * @param[in] number The number in the network byte order to be converted. 58 * @returns The number in the host byte order. 59 */ 60 #define ntohs(number) uint16_t_be2host(number) 61 62 /** Converts the given long number (32 bit) from the network byte order (big endian) to the host byte order. 63 * @param[in] number The number in the network byte order to be converted. 64 * @returns The number in the host byte order. 65 */ 66 #define ntohl(number) uint32_t_be2host(number) 61 extern int inet_ntop(uint16_t, const uint8_t *, char *, size_t); 62 extern int inet_pton(uint16_t, const char *, uint8_t *); 67 63 68 64 #endif -
uspace/lib/net/adt/module_map.c
r49d871ea rc0e74b1 42 42 #include <ipc/services.h> 43 43 44 #include <net _modules.h>44 #include <net/modules.h> 45 45 46 46 #include <adt/generic_char_map.h> -
uspace/lib/net/generic/net_remote.c
r49d871ea rc0e74b1 41 41 42 42 #include <net_messages.h> 43 #include <net _modules.h>43 #include <net/modules.h> 44 44 #include <net_device.h> 45 45 #include <net_interface.h> -
uspace/lib/net/il/arp_remote.c
r49d871ea rc0e74b1 42 42 43 43 #include <net_messages.h> 44 #include <net _modules.h>44 #include <net/modules.h> 45 45 #include <net_device.h> 46 46 #include <arp_interface.h> -
uspace/lib/net/il/ip_remote.c
r49d871ea rc0e74b1 43 43 44 44 #include <net_messages.h> 45 #include <net _modules.h>45 #include <net/modules.h> 46 46 #include <net_device.h> 47 #include < inet.h>47 #include <net/inet.h> 48 48 #include <ip_interface.h> 49 49 #include <packet/packet_client.h> -
uspace/lib/net/include/adt/module_map.h
r49d871ea rc0e74b1 42 42 #include <ipc/services.h> 43 43 44 #include <net _modules.h>44 #include <net/modules.h> 45 45 46 46 #include <adt/generic_char_map.h> -
uspace/lib/net/include/arp_messages.h
r49d871ea rc0e74b1 40 40 41 41 #include <ipc/ipc.h> 42 43 #include <net_messages.h> 42 #include <ipc/net.h> 44 43 45 44 /** ARP module messages. -
uspace/lib/net/include/icmp_header.h
r49d871ea rc0e74b1 41 41 #include <sys/types.h> 42 42 43 #include < in.h>43 #include <net/in.h> 44 44 #include <icmp_codes.h> 45 45 -
uspace/lib/net/include/icmp_interface.h
r49d871ea rc0e74b1 34 34 #define __NET_ICMP_INTERFACE_H__ 35 35 36 #include <net/socket_codes.h> 36 37 #include <sys/types.h> 37 38 … … 39 40 #include <adt/measured_strings.h> 40 41 #include <packet/packet.h> 41 #include < inet.h>42 #include <net/inet.h> 42 43 #include <ip_codes.h> 43 #include <socket_codes.h>44 44 #include <icmp_codes.h> 45 45 #include <icmp_common.h> -
uspace/lib/net/include/il_messages.h
r49d871ea rc0e74b1 41 41 42 42 #include <ipc/ipc.h> 43 #include <ipc/net.h> 43 44 44 45 /** Internet layer modules messages. -
uspace/lib/net/include/ip_client.h
r49d871ea rc0e74b1 38 38 #define __NET_IP_CLIENT_H__ 39 39 40 #include <net/socket_codes.h> 40 41 #include <sys/types.h> 41 42 … … 43 44 #include <ip_codes.h> 44 45 #include <ip_interface.h> 45 #include <socket_codes.h>46 46 47 47 /** Prepares the packet to be transfered via IP. -
uspace/lib/net/include/ip_interface.h
r49d871ea rc0e74b1 34 34 #define __NET_IP_INTERFACE_H__ 35 35 36 #include <net/socket_codes.h> 36 37 #include <async.h> 37 38 #include <ipc/services.h> … … 40 41 #include <packet/packet.h> 41 42 42 #include < in.h>43 #include <net/in.h> 43 44 #include <ip_codes.h> 44 #include <socket_codes.h>45 45 46 46 #ifdef CONFIG_IL_TL_BUNDLE -
uspace/lib/net/include/ip_local.h
r49d871ea rc0e74b1 38 38 39 39 #include <ip_codes.h> 40 #include <inet.h> 41 #include <in.h> 42 #include <socket.h> 40 #include <net/inet.h> 41 #include <net/in.h> 43 42 44 43 extern int ip_received_error_msg_local(int, device_id_t, packet_t, services_t, -
uspace/lib/net/include/ip_messages.h
r49d871ea rc0e74b1 40 40 41 41 #include <ipc/ipc.h> 42 #include <ipc/net.h> 42 43 43 #include < in.h>44 #include <net/in.h> 44 45 #include <ip_codes.h> 45 46 -
uspace/lib/net/include/ip_remote.h
r49d871ea rc0e74b1 38 38 39 39 #include <ip_codes.h> 40 #include <inet.h> 41 #include <in.h> 42 #include <socket.h> 40 #include <net/inet.h> 41 #include <net/in.h> 43 42 44 43 extern int ip_set_gateway_req_remote(int, device_id_t, in_addr_t); -
uspace/lib/net/include/net_net_messages.h
r49d871ea rc0e74b1 40 40 41 41 #include <ipc/ipc.h> 42 43 #include <net_messages.h> 42 #include <ipc/net.h> 44 43 45 44 /** Networking subsystem central module messages. -
uspace/lib/net/include/netif_messages.h
r49d871ea rc0e74b1 39 39 40 40 #include <ipc/ipc.h> 41 42 #include <net_messages.h> 41 #include <ipc/net.h> 43 42 44 43 /** Network interface common module messages. -
uspace/lib/net/include/nil_messages.h
r49d871ea rc0e74b1 39 39 40 40 #include <ipc/ipc.h> 41 42 #include <net_messages.h> 41 #include <ipc/net.h> 43 42 44 43 /** Network interface layer module messages. -
uspace/lib/net/include/tl_common.h
r49d871ea rc0e74b1 38 38 #define __NET_TL_COMMON_H__ 39 39 40 #include <net/socket_codes.h> 41 40 42 #include <packet/packet.h> 41 43 #include <net_device.h> 42 #include <inet.h> 43 #include <socket_codes.h> 44 #include <net/inet.h> 44 45 45 46 /** Device packet dimensions. -
uspace/lib/net/include/tl_messages.h
r49d871ea rc0e74b1 40 40 41 41 #include <ipc/ipc.h> 42 43 #include <net_messages.h> 42 #include <ipc/net.h> 44 43 45 44 /** Transport layer modules messages. -
uspace/lib/net/netif/netif_local.c
r49d871ea rc0e74b1 45 45 46 46 #include <net_messages.h> 47 #include <net _modules.h>47 #include <net/modules.h> 48 48 #include <packet/packet.h> 49 49 #include <packet/packet_client.h> -
uspace/lib/net/netif/netif_nil_bundle.c
r49d871ea rc0e74b1 38 38 #include <async.h> 39 39 #include <ipc/ipc.h> 40 #include <ipc/net.h> 40 41 41 #include <net_messages.h>42 42 #include <packet/packet.h> 43 43 #include <netif_nil_bundle.h> -
uspace/lib/net/netif/netif_remote.c
r49d871ea rc0e74b1 37 37 #include <ipc/services.h> 38 38 39 #include <net _modules.h>39 #include <net/modules.h> 40 40 #include <adt/measured_strings.h> 41 41 #include <packet/packet.h> … … 44 44 #include <netif_remote.h> 45 45 #include <netif_messages.h> 46 #include <net_messages.h> 46 47 47 48 int netif_get_addr_req_remote(int netif_phone, device_id_t device_id, -
uspace/lib/net/tl/icmp_remote.c
r49d871ea rc0e74b1 43 43 44 44 #include <net_messages.h> 45 #include <net _modules.h>45 #include <net/modules.h> 46 46 #include <icmp_interface.h> 47 47 #include <packet/packet_client.h> -
uspace/lib/net/tl/tl_common.c
r49d871ea rc0e74b1 36 36 */ 37 37 38 #include <net/socket_codes.h> 39 #include <net/in.h> 40 #include <net/in6.h> 41 #include <net/inet.h> 38 42 #include <async.h> 39 43 #include <ipc/services.h> … … 46 50 #include <net_device.h> 47 51 #include <icmp_interface.h> 48 #include <in.h>49 #include <in6.h>50 #include <inet.h>51 52 #include <ip_local.h> 52 53 #include <ip_remote.h> 53 #include <socket_codes.h>54 54 #include <ip_interface.h> 55 55 #include <tl_interface.h> -
uspace/lib/socket/Makefile
r49d871ea rc0e74b1 33 33 34 34 SOURCES = \ 35 generic/socket_client.c \36 35 generic/socket_core.c \ 37 generic/socket_parse.c \38 generic/inet.c \39 generic/net_modules.c \40 36 generic/icmp_common.c \ 41 37 generic/icmp_api.c \ -
uspace/lib/socket/generic/icmp_api.c
r49d871ea rc0e74b1 36 36 */ 37 37 38 #include <net/socket_codes.h> 39 #include <net/inet.h> 38 40 #include <async.h> 39 41 … … 43 45 #include <sys/types.h> 44 46 45 #include <net _modules.h>47 #include <net/modules.h> 46 48 #include <icmp_api.h> 47 #include <inet.h>48 49 #include <ip_codes.h> 49 #include <socket_codes.h>50 50 #include <icmp_messages.h> 51 51 -
uspace/lib/socket/generic/icmp_common.c
r49d871ea rc0e74b1 39 39 #include <ipc/services.h> 40 40 41 #include <net _modules.h>41 #include <net/modules.h> 42 42 #include <icmp_common.h> 43 43 #include <icmp_messages.h> -
uspace/lib/socket/generic/socket_core.c
r49d871ea rc0e74b1 35 35 */ 36 36 37 #include <net/socket_codes.h> 38 #include <net/in.h> 39 #include <net/inet.h> 40 37 41 #include <stdint.h> 38 42 #include <stdlib.h> … … 40 44 #include <err.h> 41 45 42 #include <in.h>43 #include <inet.h>44 #include <socket_codes.h>45 46 #include <adt/dynamic_fifo.h> 46 47 #include <adt/int_map.h> 47 48 #include <packet/packet.h> 48 49 #include <packet/packet_client.h> 49 #include <net _modules.h>50 #include <net/modules.h> 50 51 #include <socket_core.h> 51 52 -
uspace/lib/socket/include/icmp_api.h
r49d871ea rc0e74b1 38 38 #define __NET_ICMP_API_H__ 39 39 40 #include <net/socket_codes.h> 41 #include <net/inet.h> 40 42 #include <sys/types.h> 41 43 … … 43 45 #include <adt/measured_strings.h> 44 46 #include <packet/packet.h> 45 #include <inet.h>46 47 #include <ip_codes.h> 47 #include <socket_codes.h>48 48 #include <icmp_codes.h> 49 49 #include <icmp_common.h> -
uspace/lib/socket/include/icmp_messages.h
r49d871ea rc0e74b1 40 40 41 41 #include <ipc/ipc.h> 42 #include <ipc/net.h> 42 43 #include <sys/types.h> 43 44 44 45 #include <icmp_codes.h> 45 #include <net_messages.h>46 46 47 47 /** ICMP module messages. -
uspace/lib/socket/include/net_messages.h
r49d871ea rc0e74b1 39 39 40 40 #include <async.h> 41 42 41 #include <ipc/ipc.h> 43 42 #include <ipc/services.h> … … 46 45 #include <adt/measured_strings.h> 47 46 #include <packet/packet.h> 48 49 /** Returns a value indicating whether the value is in the interval.50 * @param[in] item The value to be checked.51 * @param[in] first_inclusive The first value in the interval inclusive.52 * @param[in] last_exclusive The first value after the interval.53 */54 #define IS_IN_INTERVAL(item, first_inclusive, last_exclusive) (((item) >= (first_inclusive)) && ((item) < (last_exclusive)))55 56 /** @name Networking message counts57 */58 /*@{*/59 60 /** The number of ARP messages.61 */62 #define NET_ARP_COUNT 563 64 /** The number of Ethernet messages.65 */66 #define NET_ETH_COUNT 067 68 /** The number of ICMP messages.69 */70 #define NET_ICMP_COUNT 671 72 /** The number of inter-network messages.73 */74 #define NET_IL_COUNT 675 76 /** The number of IP messages.77 */78 #define NET_IP_COUNT 479 80 /** The number of general networking messages.81 */82 #define NET_NET_COUNT 383 84 /** The number of network interface driver messages.85 */86 #define NET_NETIF_COUNT 687 88 /** The number of network interface layer messages.89 */90 #define NET_NIL_COUNT 791 92 /** The number of packet management system messages.93 */94 #define NET_PACKET_COUNT 595 96 /** The number of socket messages.97 */98 #define NET_SOCKET_COUNT 1499 100 /** The number of TCP messages.101 */102 #define NET_TCP_COUNT 0103 104 /** The number of transport layer messages.105 */106 #define NET_TL_COUNT 1107 108 /** The number of UDP messages.109 */110 #define NET_UDP_COUNT 0111 112 /*@}*/113 114 /** @name Networking message intervals115 */116 /*@{*/117 118 /** The first networking message.119 */120 #define NET_FIRST 2000121 122 /** The first network interface layer message.123 */124 #define NET_NETIF_FIRST NET_FIRST125 126 /** The last network interface layer message.127 */128 #define NET_NETIF_LAST (NET_NETIF_FIRST + NET_NETIF_COUNT)129 130 /** The first general networking message.131 */132 #define NET_NET_FIRST (NET_NETIF_LAST + 0)133 134 /** The last general networking message.135 */136 #define NET_NET_LAST (NET_NET_FIRST + NET_NET_COUNT)137 138 /** The first network interface layer message.139 */140 #define NET_NIL_FIRST (NET_NET_LAST + 0)141 142 /** The last network interface layer message.143 */144 #define NET_NIL_LAST (NET_NIL_FIRST + NET_NIL_COUNT)145 146 /** The first Ethernet message.147 */148 #define NET_ETH_FIRST (NET_NIL_LAST + 0)149 150 /** The last Ethernet message.151 */152 #define NET_ETH_LAST (NET_ETH_FIRST + NET_ETH_COUNT)153 154 /** The first inter-network message.155 */156 #define NET_IL_FIRST (NET_ETH_LAST + 0)157 158 /** The last inter-network message.159 */160 #define NET_IL_LAST (NET_IL_FIRST + NET_IL_COUNT)161 162 /** The first IP message.163 */164 #define NET_IP_FIRST (NET_IL_LAST + 0)165 166 /** The last IP message.167 */168 #define NET_IP_LAST (NET_IP_FIRST + NET_IP_COUNT)169 170 /** The first ARP message.171 */172 #define NET_ARP_FIRST (NET_IP_LAST + 0)173 174 /** The last ARP message.175 */176 #define NET_ARP_LAST (NET_ARP_FIRST + NET_ARP_COUNT)177 178 /** The first ICMP message.179 */180 #define NET_ICMP_FIRST (NET_ARP_LAST + 0)181 182 /** The last ICMP message.183 */184 #define NET_ICMP_LAST (NET_ICMP_FIRST + NET_ICMP_COUNT)185 186 /** The first ICMP message.187 */188 #define NET_TL_FIRST (NET_ICMP_LAST + 0)189 190 /** The last ICMP message.191 */192 #define NET_TL_LAST (NET_TL_FIRST + NET_TL_COUNT)193 194 /** The first UDP message.195 */196 #define NET_UDP_FIRST (NET_TL_LAST + 0)197 198 /** The last UDP message.199 */200 #define NET_UDP_LAST (NET_UDP_FIRST + NET_UDP_COUNT)201 202 /** The first TCP message.203 */204 #define NET_TCP_FIRST (NET_UDP_LAST + 0)205 206 /** The last TCP message.207 */208 #define NET_TCP_LAST (NET_TCP_FIRST + NET_TCP_COUNT)209 210 /** The first socket message.211 */212 #define NET_SOCKET_FIRST (NET_TCP_LAST + 0)213 214 /** The last socket message.215 */216 #define NET_SOCKET_LAST (NET_SOCKET_FIRST + NET_SOCKET_COUNT)217 218 /** The first packet management system message.219 */220 #define NET_PACKET_FIRST (NET_SOCKET_LAST + 0)221 222 /** The last packet management system message.223 */224 #define NET_PACKET_LAST (NET_PACKET_FIRST + NET_PACKET_COUNT)225 226 /** The last networking message.227 */228 #define NET_LAST NET_PACKET_LAST229 230 /** The number of networking messages.231 */232 #define NET_COUNT (NET_LAST - NET_FIRST)233 234 /** Returns a value indicating whether the IPC call is a generic networking message.235 * @param[in] call The IPC call to be checked.236 */237 #define IS_NET_MESSAGE(call) \238 IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_FIRST, NET_LAST)239 240 /** Returns a value indicating whether the IPC call is an ARP message.241 * @param[in] call The IPC call to be checked.242 */243 #define IS_NET_ARP_MESSAGE(call) \244 IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_ARP_FIRST, NET_ARP_LAST)245 246 /** Returns a value indicating whether the IPC call is an Ethernet message.247 * @param[in] call The IPC call to be checked.248 */249 #define IS_NET_ETH_MESSAGE(call) \250 IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_ETH_FIRST, NET_ETH_LAST)251 252 /** Returns a value indicating whether the IPC call is an ICMP message.253 * @param[in] call The IPC call to be checked.254 */255 #define IS_NET_ICMP_MESSAGE(call) \256 IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_ICMP_FIRST, NET_ICMP_LAST)257 258 /** Returns a value indicating whether the IPC call is an inter-network layer message.259 * @param[in] call The IPC call to be checked.260 */261 #define IS_NET_IL_MESSAGE(call) \262 IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_IL_FIRST, NET_IL_LAST)263 264 /** Returns a value indicating whether the IPC call is an IP message.265 * @param[in] call The IPC call to be checked.266 */267 #define IS_NET_IP_MESSAGE(call) \268 IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_IP_FIRST, NET_IP_LAST)269 270 /** Returns a value indicating whether the IPC call is a generic networking message.271 * @param[in] call The IPC call to be checked.272 */273 #define IS_NET_NET_MESSAGE(call) \274 IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_NET_FIRST, NET_NET_LAST)275 276 /** Returns a value indicating whether the IPC call is a network interface layer message.277 * @param[in] call The IPC call to be checked.278 */279 #define IS_NET_NIL_MESSAGE(call) \280 IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_NIL_FIRST, NET_NIL_LAST)281 282 /** Returns a value indicating whether the IPC call is a packet manaagement system message.283 * @param[in] call The IPC call to be checked.284 */285 #define IS_NET_PACKET_MESSAGE(call) \286 IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_PACKET_FIRST, NET_PACKET_LAST)287 288 /** Returns a value indicating whether the IPC call is a socket message.289 * @param[in] call The IPC call to be checked.290 */291 #define IS_NET_SOCKET_MESSAGE(call) \292 IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_SOCKET_FIRST, NET_SOCKET_LAST)293 294 /** Returns a value indicating whether the IPC call is a TCP message.295 * @param[in] call The IPC call to be checked.296 */297 #define IS_NET_TCP_MESSAGE(call) \298 IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_TCP_FIRST, NET_TCP_LAST)299 300 /** Returns a value indicating whether the IPC call is a transport layer message.301 * @param[in] call The IPC call to be checked.302 */303 #define IS_NET_TL_MESSAGE(call) \304 IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_TL_FIRST, NET_TL_LAST)305 306 /** Returns a value indicating whether the IPC call is a UDP message.307 * @param[in] call The IPC call to be checked.308 */309 #define IS_NET_UDP_MESSAGE(call) \310 IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_UDP_FIRST, NET_UDP_LAST)311 312 /*@}*/313 47 314 48 /** @name Networking specific message arguments definitions -
uspace/lib/socket/include/packet/packet_messages.h
r49d871ea rc0e74b1 39 39 40 40 #include <ipc/ipc.h> 41 42 #include <net_messages.h> 41 #include <ipc/net.h> 43 42 44 43 /** Packet server module messages. -
uspace/lib/socket/include/socket_core.h
r49d871ea rc0e74b1 40 40 #include <sys/types.h> 41 41 42 #include < in.h>42 #include <net/in.h> 43 43 #include <net_device.h> 44 44 #include <adt/generic_char_map.h>
Note:
See TracChangeset
for help on using the changeset viewer.
