Changeset a64c64d in mainline for uspace/srv/net/il/ip
- Timestamp:
- 2010-03-09T22:24:31Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 74520daf
- Parents:
- 9f2ea28
- Location:
- uspace/srv/net/il/ip
- Files:
-
- 6 edited
-
ip.h (modified) (7 diffs)
-
ip_client.c (modified) (4 diffs)
-
ip_header.h (modified) (6 diffs)
-
ip_messages.h (modified) (4 diffs)
-
ip_module.c (modified) (3 diffs)
-
ip_remote.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/il/ip/ip.h
r9f2ea28 ra64c64d 106 106 */ 107 107 struct ip_netif{ 108 /** Device identifier.109 */110 device_id_t device_id;111 /** Netif module service.112 */113 services_t service;114 /** Netif module phone.115 */116 int phone;117 108 /** ARP module. 118 109 * Assigned if using ARP. 119 110 */ 120 111 module_ref arp; 112 /** Broadcast address. 113 */ 114 in_addr_t broadcast; 115 /** Device identifier. 116 */ 117 device_id_t device_id; 118 /** Indicates whether using DHCP. 119 */ 120 int dhcp; 121 121 /** IP version. 122 122 */ 123 123 int ipv; 124 /** Indicates whether using DHCP. 125 */ 126 int dhcp; 124 /** Packet dimension. 125 */ 126 packet_dimension_t packet_dimension; 127 /** Netif module phone. 128 */ 129 int phone; 130 /** Routing table. 131 */ 132 ip_routes_t routes; 127 133 /** Indicates whether IP routing is enabled. 128 134 */ 129 135 int routing; 136 /** Netif module service. 137 */ 138 services_t service; 130 139 /** Device state. 131 140 */ 132 141 device_state_t state; 133 /** Broadcast address.134 */135 in_addr_t broadcast;136 /** Routing table.137 */138 ip_routes_t routes;139 /** Packet dimension.140 */141 packet_dimension_t packet_dimension;142 142 }; 143 143 … … 145 145 */ 146 146 struct ip_proto{ 147 /** Protocol module phone. 148 */ 149 int phone; 147 150 /** Protocol number. 148 151 */ 149 152 int protocol; 153 /** Protocol packet receiving function. 154 */ 155 tl_received_msg_t received_msg; 150 156 /** Protocol module service. 151 157 */ 152 158 services_t service; 153 /** Protocol module phone.154 */155 int phone;156 /** Protocol packet receiving function.157 */158 tl_received_msg_t received_msg;159 159 }; 160 160 … … 165 165 */ 166 166 in_addr_t address; 167 /** Target network mask.168 */169 in_addr_t netmask;170 167 /** Gateway. 171 168 */ … … 174 171 */ 175 172 ip_netif_ref netif; 173 /** Target network mask. 174 */ 175 in_addr_t netmask; 176 176 }; 177 177 … … 179 179 */ 180 180 struct ip_globals{ 181 /** Default client connection function for support modules. 182 */ 183 async_client_conn_t client_connection; 184 /** Default gateway. 185 */ 186 ip_route_t gateway; 187 /** Safety lock. 188 */ 189 fibril_rwlock_t lock; 190 /** Known support modules. 191 */ 192 modules_t modules; 181 193 /** Networking module phone. 182 194 */ … … 188 200 */ 189 201 fibril_rwlock_t netifs_lock; 202 /** Packet counter. 203 */ 204 uint16_t packet_counter; 190 205 /** Registered protocols. 191 206 */ … … 194 209 */ 195 210 fibril_rwlock_t protos_lock; 196 /** Default gateway.197 */198 ip_route_t gateway;199 /** Known support modules.200 */201 modules_t modules;202 /** Default client connection function for support modules.203 */204 async_client_conn_t client_connection;205 /** Packet counter.206 */207 uint16_t packet_counter;208 /** Safety lock.209 */210 fibril_rwlock_t lock;211 211 }; 212 212 -
uspace/srv/net/il/ip/ip_client.c
r9f2ea28 ra64c64d 48 48 #include "ip_header.h" 49 49 50 int ip_client_prepare_packet(packet_t packet, ip_protocol_t protocol, ip_ttl_t ttl, ip_tos_t tos, int dont_fragment, size_t ipopt_length){51 ip_header_ref header;52 uint8_t * data;53 size_t padding;54 55 padding = ipopt_length % 4;56 if(padding){57 padding = 4 - padding;58 ipopt_length += padding;59 }60 data = (uint8_t *) packet_prefix(packet, sizeof(ip_header_t) + padding);61 if(! data){62 return ENOMEM;63 }64 while(padding --){65 data[sizeof(ip_header_t) + padding] = IPOPT_NOOP;66 }67 header = (ip_header_ref) data;68 header->header_length = IP_COMPUTE_HEADER_LENGTH(sizeof(ip_header_t) + ipopt_length);69 header->ttl = (ttl ? ttl : IPDEFTTL); //(((ttl) <= MAXTTL) ? ttl : MAXTTL) : IPDEFTTL;70 header->tos = tos;71 header->protocol = protocol;72 if(dont_fragment){73 header->flags = IPFLAG_DONT_FRAGMENT;74 }75 return EOK;76 }77 78 int ip_client_process_packet(packet_t packet, ip_protocol_t * protocol, ip_ttl_t * ttl, ip_tos_t * tos, int * dont_fragment, size_t * ipopt_length){79 ip_header_ref header;80 81 header = (ip_header_ref) packet_get_data(packet);82 if((! header)83 || (packet_get_data_length(packet) < sizeof(ip_header_t))){84 return ENOMEM;85 }86 if(protocol){87 *protocol = header->protocol;88 }89 if(ttl){90 *ttl = header->ttl;91 }92 if(tos){93 *tos = header->tos;94 }95 if(dont_fragment){96 *dont_fragment = header->flags &IPFLAG_DONT_FRAGMENT;97 }98 if(ipopt_length){99 *ipopt_length = IP_HEADER_LENGTH(header) - sizeof(ip_header_t);100 return sizeof(ip_header_t);101 }else{102 return IP_HEADER_LENGTH(header);103 }104 }105 106 50 size_t ip_client_header_length(packet_t packet){ 107 51 ip_header_ref header; … … 113 57 } 114 58 return IP_HEADER_LENGTH(header); 115 }116 117 int ip_client_set_pseudo_header_data_length(ip_pseudo_header_ref header, size_t headerlen, size_t data_length){118 ipv4_pseudo_header_ref header_in;119 120 if(! header){121 return EBADMEM;122 }123 if(headerlen == sizeof(ipv4_pseudo_header_t)){124 header_in = (ipv4_pseudo_header_ref) header;125 header_in->data_length = htons(data_length);126 return EOK;127 }else{128 return EINVAL;129 }130 59 } 131 60 … … 140 69 return EINVAL; 141 70 } 71 142 72 switch(src->sa_family){ 143 73 case AF_INET: … … 171 101 } 172 102 103 int ip_client_prepare_packet(packet_t packet, ip_protocol_t protocol, ip_ttl_t ttl, ip_tos_t tos, int dont_fragment, size_t ipopt_length){ 104 ip_header_ref header; 105 uint8_t * data; 106 size_t padding; 107 108 // compute the padding if IP options are set 109 // multiple of 4 bytes 110 padding = ipopt_length % 4; 111 if(padding){ 112 padding = 4 - padding; 113 ipopt_length += padding; 114 } 115 116 // prefix the header 117 data = (uint8_t *) packet_prefix(packet, sizeof(ip_header_t) + padding); 118 if(! data){ 119 return ENOMEM; 120 } 121 122 // add the padding 123 while(padding --){ 124 data[sizeof(ip_header_t) + padding] = IPOPT_NOOP; 125 } 126 127 // set the header 128 header = (ip_header_ref) data; 129 header->header_length = IP_COMPUTE_HEADER_LENGTH(sizeof(ip_header_t) + ipopt_length); 130 header->ttl = (ttl ? ttl : IPDEFTTL); //(((ttl) <= MAXTTL) ? ttl : MAXTTL) : IPDEFTTL; 131 header->tos = tos; 132 header->protocol = protocol; 133 134 if(dont_fragment){ 135 header->flags = IPFLAG_DONT_FRAGMENT; 136 } 137 return EOK; 138 } 139 140 int ip_client_process_packet(packet_t packet, ip_protocol_t * protocol, ip_ttl_t * ttl, ip_tos_t * tos, int * dont_fragment, size_t * ipopt_length){ 141 ip_header_ref header; 142 143 header = (ip_header_ref) packet_get_data(packet); 144 if((! header) 145 || (packet_get_data_length(packet) < sizeof(ip_header_t))){ 146 return ENOMEM; 147 } 148 149 if(protocol){ 150 *protocol = header->protocol; 151 } 152 if(ttl){ 153 *ttl = header->ttl; 154 } 155 if(tos){ 156 *tos = header->tos; 157 } 158 if(dont_fragment){ 159 *dont_fragment = header->flags &IPFLAG_DONT_FRAGMENT; 160 } 161 if(ipopt_length){ 162 *ipopt_length = IP_HEADER_LENGTH(header) - sizeof(ip_header_t); 163 return sizeof(ip_header_t); 164 }else{ 165 return IP_HEADER_LENGTH(header); 166 } 167 } 168 169 int ip_client_set_pseudo_header_data_length(ip_pseudo_header_ref header, size_t headerlen, size_t data_length){ 170 ipv4_pseudo_header_ref header_in; 171 172 if(! header){ 173 return EBADMEM; 174 } 175 176 if(headerlen == sizeof(ipv4_pseudo_header_t)){ 177 header_in = (ipv4_pseudo_header_ref) header; 178 header_in->data_length = htons(data_length); 179 return EOK; 180 // TODO IPv6 181 }else{ 182 return EINVAL; 183 } 184 } 185 173 186 /** @} 174 187 */ -
uspace/srv/net/il/ip/ip_header.h
r9f2ea28 ra64c64d 42 42 #include <sys/types.h> 43 43 44 /** Returns the actual IP header length in bytes. 45 * @param[in] header The IP packet header. 46 */ 47 #define IP_HEADER_LENGTH(header) ((header)->header_length * 4u) 44 /** Returns the fragment offest high bits. 45 * @param[in] length The prefixed data total length. 46 */ 47 #define IP_COMPUTE_FRAGMENT_OFFSET_HIGH(length) ((((length) / 8u) &0x1F00) >> 8) 48 49 /** Returns the fragment offest low bits. 50 * @param[in] length The prefixed data total length. 51 */ 52 #define IP_COMPUTE_FRAGMENT_OFFSET_LOW(length) (((length) / 8u) &0xFF) 48 53 49 54 /** Returns the IP header length. … … 52 57 #define IP_COMPUTE_HEADER_LENGTH(length) ((uint8_t) ((length) / 4u)) 53 58 59 /** Returns the fragment offest. 60 * @param[in] header The IP packet header. 61 */ 62 #define IP_FRAGMENT_OFFSET(header) ((((header)->fragment_offset_high << 8) + (header)->fragment_offset_low) * 8u) 63 64 /** Returns the IP packet header checksum. 65 * @param[in] header The IP packet header. 66 */ 67 #define IP_HEADER_CHECKSUM(header) (htons(ip_checksum((uint8_t *)(header), IP_HEADER_LENGTH(header)))) 68 69 /** Returns the actual IP packet data length. 70 * @param[in] header The IP packet header. 71 */ 72 #define IP_HEADER_DATA_LENGTH(header) (IP_TOTAL_LENGTH(header) - IP_HEADER_LENGTH(header)) 73 74 /** Returns the actual IP header length in bytes. 75 * @param[in] header The IP packet header. 76 */ 77 #define IP_HEADER_LENGTH(header) ((header)->header_length * 4u) 78 54 79 /** Returns the actual IP packet total length. 55 80 * @param[in] header The IP packet header. … … 57 82 #define IP_TOTAL_LENGTH(header) ntohs((header)->total_length) 58 83 59 /** Returns the actual IP packet data length. 60 * @param[in] header The IP packet header. 61 */ 62 #define IP_HEADER_DATA_LENGTH(header) (IP_TOTAL_LENGTH(header) - IP_HEADER_LENGTH(header)) 63 64 /** Returns the IP packet header checksum. 65 * @param[in] header The IP packet header. 66 */ 67 #define IP_HEADER_CHECKSUM(header) (htons(ip_checksum((uint8_t *)(header), IP_HEADER_LENGTH(header)))) 68 69 /** Returns the fragment offest. 70 * @param[in] header The IP packet header. 71 */ 72 #define IP_FRAGMENT_OFFSET(header) ((((header)->fragment_offset_high << 8) + (header)->fragment_offset_low) * 8u) 73 74 /** Returns the fragment offest high bits. 75 * @param[in] length The prefixed data total length. 76 */ 77 #define IP_COMPUTE_FRAGMENT_OFFSET_HIGH(length) ((((length) / 8u) &0x1F00) >> 8) 78 79 /** Returns the fragment offest low bits. 80 * @param[in] length The prefixed data total length. 81 */ 82 #define IP_COMPUTE_FRAGMENT_OFFSET_LOW(length) (((length) / 8u) &0xFF) 84 /** @name IP flags definitions 85 */ 86 /*@{*/ 87 88 /** Fragment flag field shift. 89 */ 90 #define IPFLAG_FRAGMENT_SHIFT 1 91 92 /** Fragmented flag field shift. 93 */ 94 #define IPFLAG_FRAGMENTED_SHIFT 0 95 96 /** Don't fragment flag value. 97 * Permits the packet fragmentation. 98 */ 99 #define IPFLAG_DONT_FRAGMENT (0x1 << IPFLAG_FRAGMENT_SHIFT) 100 101 /** Last fragment flag value. 102 * Indicates the last packet fragment. 103 */ 104 #define IPFLAG_LAST_FRAGMENT (0x0 << IPFLAG_FRAGMENTED_SHIFT) 105 106 /** May fragment flag value. 107 * Allows the packet fragmentation. 108 */ 109 #define IPFLAG_MAY_FRAGMENT (0x0 << IPFLAG_FRAGMENT_SHIFT) 110 111 /** More fragments flag value. 112 * Indicates that more packet fragments follow. 113 */ 114 #define IPFLAG_MORE_FRAGMENTS (0x1 << IPFLAG_FRAGMENTED_SHIFT) 115 116 /*@}*/ 83 117 84 118 /** Type definition of the internet header. … … 91 125 */ 92 126 typedef ip_header_t * ip_header_ref; 127 128 /** Type definition of the internet option header. 129 * @see ip_header 130 */ 131 typedef struct ip_option ip_option_t; 132 133 /** Type definition of the internet option header pointer. 134 * @see ip_header 135 */ 136 typedef ip_option_t * ip_option_ref; 137 138 /** Type definition of the internet version 4 pseudo header. 139 * @see ipv4_pseudo_header 140 */ 141 typedef struct ipv4_pseudo_header ipv4_pseudo_header_t; 142 143 /** Type definition of the internet version 4 pseudo header pointer. 144 * @see ipv4_pseudo_header 145 */ 146 typedef ipv4_pseudo_header_t * ipv4_pseudo_header_ref; 93 147 94 148 /** Internet header. … … 171 225 } __attribute__ ((packed)); 172 226 173 /** Type definition of the internet option header.174 * @see ip_header175 */176 typedef struct ip_option ip_option_t;177 178 /** Type definition of the internet option header pointer.179 * @see ip_header180 */181 typedef ip_option_t * ip_option_ref;182 183 227 /** Internet option header. 184 228 * Only type field is always valid. … … 212 256 } __attribute__ ((packed)); 213 257 214 /** @name IP flags definitions215 */216 /*@{*/217 218 /** Fragment flag field shift.219 */220 #define IPFLAG_FRAGMENT_SHIFT 1221 222 /** Fragmented flag field shift.223 */224 #define IPFLAG_FRAGMENTED_SHIFT 0225 226 /** May fragment flag value.227 * Allows the packet fragmentation.228 */229 #define IPFLAG_MAY_FRAGMENT (0x0 << IPFLAG_FRAGMENT_SHIFT)230 231 /** Don't fragment flag value.232 * Permits the packet fragmentation.233 */234 #define IPFLAG_DONT_FRAGMENT (0x1 << IPFLAG_FRAGMENT_SHIFT)235 236 /** Last fragment flag value.237 * Indicates the last packet fragment.238 */239 #define IPFLAG_LAST_FRAGMENT (0x0 << IPFLAG_FRAGMENTED_SHIFT)240 241 /** More fragments flag value.242 * Indicates that more packet fragments follow.243 */244 #define IPFLAG_MORE_FRAGMENTS (0x1 << IPFLAG_FRAGMENTED_SHIFT)245 246 /*@}*/247 248 /** Type definition of the internet version 4 pseudo header.249 * @see ipv4_pseudo_header250 */251 typedef struct ipv4_pseudo_header ipv4_pseudo_header_t;252 253 /** Type definition of the internet version 4 pseudo header pointer.254 * @see ipv4_pseudo_header255 */256 typedef ipv4_pseudo_header_t * ipv4_pseudo_header_ref;257 258 258 /** Internet version 4 pseudo header. 259 259 */ -
uspace/srv/net/il/ip/ip_messages.h
r9f2ea28 ra64c64d 51 51 */ 52 52 NET_IP_ADD_ROUTE = NET_IP_FIRST, 53 /** Sets the default gateway.54 * @see ip_ set_default_gateway()53 /** Gets the actual route information. 54 * @see ip_get_route() 55 55 */ 56 NET_IP_ SET_GATEWAY,56 NET_IP_GET_ROUTE, 57 57 /** Processes the received error notification. 58 58 * @see ip_received_error_msg() 59 59 */ 60 60 NET_IP_RECEIVED_ERROR, 61 /** Gets the actual route information.62 * @see ip_ get_route()61 /** Sets the default gateway. 62 * @see ip_set_default_gateway() 63 63 */ 64 NET_IP_ GET_ROUTE64 NET_IP_SET_GATEWAY 65 65 } ip_messages; 66 66 … … 69 69 /*@{*/ 70 70 71 /** Returns the address message parameter. 72 * @param[in] call The message call structure. 73 */ 74 #define IP_GET_ADDRESS(call) ({in_addr_t addr; addr.s_addr = IPC_GET_ARG3(*call); addr;}) 75 71 76 /** Returns the gateway message parameter. 72 77 * @param[in] call The message call structure. … … 74 79 #define IP_GET_GATEWAY(call) ({in_addr_t addr; addr.s_addr = IPC_GET_ARG2(*call); addr;}) 75 80 76 /** Returns the address message parameter.77 * @param[ in] call The message callstructure.81 /** Sets the header length in the message answer. 82 * @param[out] answer The message answer structure. 78 83 */ 79 #define IP_ GET_ADDRESS(call) ({in_addr_t addr; addr.s_addr = IPC_GET_ARG3(*call); addr;})84 #define IP_SET_HEADERLEN(answer) ((size_t *) &IPC_GET_ARG2(*answer)) 80 85 81 86 /** Returns the network mask message parameter. … … 89 94 #define IP_GET_PROTOCOL(call) ((ip_protocol_t) IPC_GET_ARG1(*call)) 90 95 91 /** Sets the header length in the message answer.92 * @param[out] answer The message answer structure.93 */94 #define IP_SET_HEADERLEN(answer) ((size_t *) &IPC_GET_ARG2(*answer))95 96 96 /*@}*/ 97 97 -
uspace/srv/net/il/ip/ip_module.c
r9f2ea28 ra64c64d 58 58 #define NAME "IP protocol" 59 59 60 /** IP module global data. 61 */ 62 extern ip_globals_t ip_globals; 63 64 /** Processes the IP message. 65 * @param[in] callid The message identifier. 66 * @param[in] call The message parameters. 67 * @param[out] answer The message answer parameters. 68 * @param[out] answer_count The last parameter for the actual answer in the answer parameter. 69 * @returns EOK on success. 70 * @returns Other error codes as defined for the ip_message() function. 71 */ 72 int module_message(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count); 73 60 74 /** Prints the module name. 61 75 * @see NAME … … 72 86 int module_start(async_client_conn_t client_connection); 73 87 74 /** Processes the IP message. 75 * @param[in] callid The message identifier. 76 * @param[in] call The message parameters. 77 * @param[out] answer The message answer parameters. 78 * @param[out] answer_count The last parameter for the actual answer in the answer parameter. 79 * @returns EOK on success. 80 * @returns Other error codes as defined for the ip_message() function. 81 */ 82 int module_message(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count); 83 84 /** IP module global data. 85 */ 86 extern ip_globals_t ip_globals; 88 int module_message(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count){ 89 return ip_message(callid, call, answer, answer_count); 90 } 87 91 88 92 void module_print_name(void){ … … 110 114 } 111 115 112 int module_message(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count){113 return ip_message(callid, call, answer, answer_count);114 }115 116 116 /** @} 117 117 */ -
uspace/srv/net/il/ip/ip_remote.c
r9f2ea28 ra64c64d 52 52 #include "ip_messages.h" 53 53 54 int ip_ device_req(int ip_phone, device_id_t device_id, services_t service){55 return generic_device_req(ip_phone, NET_IL_DEVICE, device_id, 0, service);54 int ip_add_route_req(int ip_phone, device_id_t device_id, in_addr_t address, in_addr_t netmask, in_addr_t gateway){ 55 return (int) async_req_4_0(ip_phone, NET_IP_ADD_ROUTE, (ipcarg_t) device_id, (ipcarg_t) gateway.s_addr, (ipcarg_t) address.s_addr, (ipcarg_t) netmask.s_addr); 56 56 } 57 57 58 int ip_ send_msg(int ip_phone, device_id_t device_id, packet_t packet, services_t sender, services_t error){59 return generic_send_msg(ip_phone, NET_IL_SEND, device_id, packet_get_id(packet), sender, error);58 int ip_bind_service(services_t service, int protocol, services_t me, async_client_conn_t receiver, tl_received_msg_t tl_received_msg){ 59 return (int) bind_service(service, (ipcarg_t) protocol, me, service, receiver); 60 60 } 61 61 … … 64 64 } 65 65 66 int ip_add_route_req(int ip_phone, device_id_t device_id, in_addr_t address, in_addr_t netmask, in_addr_t gateway){ 67 return (int) async_req_4_0(ip_phone, NET_IP_ADD_ROUTE, (ipcarg_t) device_id, (ipcarg_t) gateway.s_addr, (ipcarg_t) address.s_addr, (ipcarg_t) netmask.s_addr); 68 } 69 70 int ip_set_gateway_req(int ip_phone, device_id_t device_id, in_addr_t gateway){ 71 return (int) async_req_2_0(ip_phone, NET_IP_SET_GATEWAY, (ipcarg_t) device_id, (ipcarg_t) gateway.s_addr); 72 } 73 74 int ip_packet_size_req(int ip_phone, device_id_t device_id, packet_dimension_ref packet_dimension){ 75 return generic_packet_size_req(ip_phone, NET_IL_PACKET_SPACE, device_id, packet_dimension); 76 } 77 78 int ip_bind_service(services_t service, int protocol, services_t me, async_client_conn_t receiver, tl_received_msg_t tl_received_msg){ 79 return (int) bind_service(service, (ipcarg_t) protocol, me, service, receiver); 80 } 81 82 int ip_received_error_msg(int ip_phone, device_id_t device_id, packet_t packet, services_t target, services_t error){ 83 return generic_received_msg(ip_phone, NET_IP_RECEIVED_ERROR, device_id, packet_get_id(packet), target, error); 66 int ip_device_req(int ip_phone, device_id_t device_id, services_t service){ 67 return generic_device_req(ip_phone, NET_IL_DEVICE, device_id, 0, service); 84 68 } 85 69 … … 95 79 return EBADMEM; 96 80 } 81 97 82 *header = NULL; 98 83 message_id = async_send_1(ip_phone, NET_IP_GET_ROUTE, (ipcarg_t) protocol, &answer); … … 108 93 } 109 94 async_wait_for(message_id, &result); 95 110 96 if((result != EOK) && (*header)){ 111 97 free(*header); … … 116 102 } 117 103 104 int ip_packet_size_req(int ip_phone, device_id_t device_id, packet_dimension_ref packet_dimension){ 105 return generic_packet_size_req(ip_phone, NET_IL_PACKET_SPACE, device_id, packet_dimension); 106 } 107 108 int ip_received_error_msg(int ip_phone, device_id_t device_id, packet_t packet, services_t target, services_t error){ 109 return generic_received_msg(ip_phone, NET_IP_RECEIVED_ERROR, device_id, packet_get_id(packet), target, error); 110 } 111 112 int ip_send_msg(int ip_phone, device_id_t device_id, packet_t packet, services_t sender, services_t error){ 113 return generic_send_msg(ip_phone, NET_IL_SEND, device_id, packet_get_id(packet), sender, error); 114 } 115 116 int ip_set_gateway_req(int ip_phone, device_id_t device_id, in_addr_t gateway){ 117 return (int) async_req_2_0(ip_phone, NET_IP_SET_GATEWAY, (ipcarg_t) device_id, (ipcarg_t) gateway.s_addr); 118 } 119 118 120 /** @} 119 121 */
Note:
See TracChangeset
for help on using the changeset viewer.
