Changeset 779a47d in mainline
- Timestamp:
- 2010-10-15T19:04:29Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3a5d892f
- Parents:
- 522253c1
- Location:
- uspace
- Files:
-
- 2 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/ipc/ip.h
r522253c1 r779a47d 27 27 */ 28 28 29 /** @addtogroup ip30 * 29 /** @addtogroup libc 30 * @{ 31 31 */ 32 32 33 33 /** @file 34 * 35 * 34 * IP module messages. 35 * @see ip_interface.h 36 36 */ 37 37 38 #ifndef __NET_IP_MESSAGES_H__39 #define __NET_IP_MESSAGES_H__38 #ifndef LIBC_IP_MESSAGES_H_ 39 #define LIBC_IP_MESSAGES_H_ 40 40 41 41 #include <ipc/ipc.h> … … 45 45 #include <net/ip_codes.h> 46 46 47 /** IP module messages. 48 */ 49 typedef enum{ 47 /** IP module messages. */ 48 typedef enum { 50 49 /** Adds the routing entry. 51 * 50 * @see ip_add_route() 52 51 */ 53 52 NET_IP_ADD_ROUTE = NET_IP_FIRST, 54 53 /** Gets the actual route information. 55 * 54 * @see ip_get_route() 56 55 */ 57 56 NET_IP_GET_ROUTE, 58 57 /** Processes the received error notification. 59 * 58 * @see ip_received_error_msg() 60 59 */ 61 60 NET_IP_RECEIVED_ERROR, 62 61 /** Sets the default gateway. 63 * 62 * @see ip_set_default_gateway() 64 63 */ 65 64 NET_IP_SET_GATEWAY 66 65 } ip_messages; 67 66 68 /** @name IP specific message parameters definitions 69 */ 67 /** @name IP specific message parameters definitions */ 70 68 /*@{*/ 71 69 72 70 /** Returns the address message parameter. 73 * 71 * @param[in] call The message call structure. 74 72 */ 75 73 #define IP_GET_ADDRESS(call) \ 76 ({in_addr_t addr; addr.s_addr = IPC_GET_ARG3(*call); addr;}) 74 ({ \ 75 in_addr_t addr; \ 76 addr.s_addr = IPC_GET_ARG3(*call); \ 77 addr; \ 78 }) 77 79 78 80 /** Returns the gateway message parameter. 79 * 81 * @param[in] call The message call structure. 80 82 */ 81 83 #define IP_GET_GATEWAY(call) \ 82 ({in_addr_t addr; addr.s_addr = IPC_GET_ARG2(*call); addr;}) 84 ({ \ 85 in_addr_t addr; \ 86 addr.s_addr = IPC_GET_ARG2(*call); \ 87 addr; \ 88 }) 83 89 84 90 /** Sets the header length in the message answer. 85 * 91 * @param[out] answer The message answer structure. 86 92 */ 87 93 #define IP_SET_HEADERLEN(answer, value) \ 88 {ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG2(*answer, argument);} 94 do { \ 95 ipcarg_t argument = (ipcarg_t) (value); \ 96 IPC_SET_ARG2(*answer, argument); \ 97 } while (0) 89 98 90 99 /** Returns the network mask message parameter. 91 * 100 * @param[in] call The message call structure. 92 101 */ 93 102 #define IP_GET_NETMASK(call) \ 94 ({in_addr_t addr; addr.s_addr = IPC_GET_ARG4(*call); addr;}) 103 ({ \ 104 in_addr_t addr; \ 105 addr.s_addr = IPC_GET_ARG4(*call); \ 106 addr; \ 107 }) 95 108 96 109 /** Returns the protocol message parameter. 97 * 110 * @param[in] call The message call structure. 98 111 */ 99 112 #define IP_GET_PROTOCOL(call) \ 100 ({ip_protocol_t protocol = (ip_protocol_t) IPC_GET_ARG1(*call); protocol;}) 113 ({ \ 114 ip_protocol_t protocol = (ip_protocol_t) IPC_GET_ARG1(*call); \ 115 protocol; \ 116 }) 101 117 102 118 /*@}*/ -
uspace/lib/net/il/ip_remote.c
r522253c1 r779a47d 42 42 #include <ip_remote.h> 43 43 #include <ip_interface.h> 44 #include <ip_messages.h>45 44 #include <packet_client.h> 46 45 #include <generic.h> … … 48 47 #include <ipc/services.h> 49 48 #include <ipc/il.h> 49 #include <ipc/ip.h> 50 50 51 51 #include <net/modules.h> -
uspace/srv/net/il/ip/ip.c
r522253c1 r779a47d 46 46 #include <ipc/net.h> 47 47 #include <ipc/il.h> 48 #include <ipc/ip.h> 48 49 #include <sys/types.h> 49 50 #include <byteorder.h> … … 78 79 #include "ip.h" 79 80 #include "ip_header.h" 80 #include "ip_messages.h"81 81 #include "ip_module.h" 82 82
Note:
See TracChangeset
for help on using the changeset viewer.