Changeset 46d4d9f in mainline for uspace/srv
- Timestamp:
- 2010-11-20T17:04:59Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- dd5046dd
- Parents:
- fdbc3ff
- Location:
- uspace/srv
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hw/netif/dp8390/dp8390.c
rfdbc3ff r46d4d9f 65 65 * @return EINVAL 66 66 */ 67 int queue_packet(dpeth_t * dep, packet_t packet);67 int queue_packet(dpeth_t * dep, packet_t *packet); 68 68 69 69 /** Reads a memory block byte by byte. … … 336 336 } 337 337 338 int queue_packet(dpeth_t * dep, packet_t packet){339 packet_t tmp;338 int queue_packet(dpeth_t * dep, packet_t *packet){ 339 packet_t *tmp; 340 340 341 341 if(dep->packet_count >= MAX_PACKETS){ … … 361 361 * based on do_vwrite * 362 362 *===========================================================================*/ 363 int do_pwrite(dpeth_t * dep, packet_t packet, int from_int)363 int do_pwrite(dpeth_t * dep, packet_t *packet, int from_int) 364 364 { 365 365 // int port, count, size; … … 910 910 dpeth_t *dep; 911 911 { 912 packet_t packet;912 packet_t *packet; 913 913 914 914 // if (!(dep->de_flags &DEF_SEND_AVAIL)) … … 1003 1003 { 1004 1004 int last, count; 1005 packet_t packet;1005 packet_t *packet; 1006 1006 1007 1007 // if (!(dep->de_flags &DEF_READING)) -
uspace/srv/hw/netif/dp8390/dp8390.h
rfdbc3ff r46d4d9f 313 313 /** Outgoing packets queue. 314 314 */ 315 packet_t packet_queue;315 packet_t *packet_queue; 316 316 /** Outgoing packets count. 317 317 */ … … 320 320 /** Received packets queue. 321 321 */ 322 packet_t received_queue;322 packet_t *received_queue; 323 323 /** Received packets count. 324 324 */ -
uspace/srv/hw/netif/dp8390/dp8390_drv.h
rfdbc3ff r46d4d9f 72 72 * @returns 73 73 */ 74 int do_pwrite(dpeth_t * dep, packet_t packet, int from_int);74 int do_pwrite(dpeth_t * dep, packet_t *packet, int from_int); 75 75 76 76 /** Prints out network interface information. -
uspace/srv/hw/netif/dp8390/dp8390_module.c
rfdbc3ff r46d4d9f 103 103 netif_device_t * device; 104 104 dpeth_t * dep; 105 packet_t received;105 packet_t *received; 106 106 device_id_t device_id; 107 107 int phone; … … 247 247 } 248 248 249 int netif_send_message(device_id_t device_id, packet_t packet, services_t sender){250 netif_device_t * device; 251 dpeth_t * dep; 252 packet_t next;249 int netif_send_message(device_id_t device_id, packet_t *packet, services_t sender){ 250 netif_device_t * device; 251 dpeth_t * dep; 252 packet_t *next; 253 253 int rc; 254 254 -
uspace/srv/net/il/arp/arp.c
rfdbc3ff r46d4d9f 415 415 * @return ENOMEM if there is not enough memory left. 416 416 */ 417 static int arp_receive_message(device_id_t device_id, packet_t packet)417 static int arp_receive_message(device_id_t device_id, packet_t *packet) 418 418 { 419 419 size_t length; … … 531 531 measured_string_t *addr; 532 532 size_t length; 533 packet_t packet;533 packet_t *packet; 534 534 arp_header_t *header; 535 535 … … 615 615 measured_string_t *translation; 616 616 char *data; 617 packet_t packet;618 packet_t next;617 packet_t *packet; 618 packet_t *next; 619 619 int rc; 620 620 -
uspace/srv/net/il/ip/ip.c
rfdbc3ff r46d4d9f 129 129 * @return The result parameter. 130 130 */ 131 static int ip_release_and_return(packet_t packet, int result)131 static int ip_release_and_return(packet_t *packet, int result) 132 132 { 133 133 pq_release_remote(ip_globals.net_phone, packet_get_id(packet)); … … 170 170 * @return Other error codes as defined for the packet_set_addr(). 171 171 */ 172 static int ip_prepare_icmp(packet_t packet, ip_header_t *header)173 { 174 packet_t next;172 static int ip_prepare_icmp(packet_t *packet, ip_header_t *header) 173 { 174 packet_t *next; 175 175 struct sockaddr *dest; 176 176 struct sockaddr_in dest_in; … … 233 233 */ 234 234 static int 235 ip_prepare_icmp_and_get_phone(services_t error, packet_t packet,235 ip_prepare_icmp_and_get_phone(services_t error, packet_t *packet, 236 236 ip_header_t *header) 237 237 { … … 543 543 */ 544 544 static ip_header_t * 545 ip_create_middle_header(packet_t packet, ip_header_t *last)545 ip_create_middle_header(packet_t *packet, ip_header_t *last) 546 546 { 547 547 ip_header_t *middle; … … 622 622 */ 623 623 static int 624 ip_prepare_packet(in_addr_t *source, in_addr_t dest, packet_t packet,624 ip_prepare_packet(in_addr_t *source, in_addr_t dest, packet_t *packet, 625 625 measured_string_t *destination) 626 626 { … … 629 629 ip_header_t *last_header; 630 630 ip_header_t *middle_header; 631 packet_t next;631 packet_t *next; 632 632 int rc; 633 633 … … 754 754 */ 755 755 static int 756 ip_fragment_packet_data(packet_t packet, packet_tnew_packet,756 ip_fragment_packet_data(packet_t *packet, packet_t *new_packet, 757 757 ip_header_t *header, ip_header_t *new_header, size_t length, 758 758 const struct sockaddr *src, const struct sockaddr *dest, socklen_t addrlen) … … 816 816 */ 817 817 static int 818 ip_fragment_packet(packet_t packet, size_t length, size_t prefix, size_t suffix,818 ip_fragment_packet(packet_t *packet, size_t length, size_t prefix, size_t suffix, 819 819 socklen_t addr_len) 820 820 { 821 packet_t new_packet;821 packet_t *new_packet; 822 822 ip_header_t *header; 823 823 ip_header_t *middle_header; … … 922 922 * @return NULL if there are no packets left. 923 923 */ 924 static packet_t 925 ip_split_packet(packet_t packet, size_t prefix, size_t content, size_t suffix,924 static packet_t * 925 ip_split_packet(packet_t *packet, size_t prefix, size_t content, size_t suffix, 926 926 socklen_t addr_len, services_t error) 927 927 { 928 928 size_t length; 929 packet_t next;930 packet_t new_packet;929 packet_t *next; 930 packet_t *new_packet; 931 931 int result; 932 932 int phone; … … 993 993 */ 994 994 static int 995 ip_send_route(packet_t packet, ip_netif_t *netif, ip_route_t *route,995 ip_send_route(packet_t *packet, ip_netif_t *netif, ip_route_t *route, 996 996 in_addr_t *src, in_addr_t dest, services_t error) 997 997 { … … 1247 1247 1248 1248 static int 1249 ip_send_msg_local(int il_phone, device_id_t device_id, packet_t packet,1249 ip_send_msg_local(int il_phone, device_id_t device_id, packet_t *packet, 1250 1250 services_t sender, services_t error) 1251 1251 { … … 1451 1451 */ 1452 1452 static int 1453 ip_deliver_local(device_id_t device_id, packet_t packet, ip_header_t *header,1453 ip_deliver_local(device_id_t device_id, packet_t *packet, ip_header_t *header, 1454 1454 services_t error) 1455 1455 { … … 1553 1553 */ 1554 1554 static int 1555 ip_process_packet(device_id_t device_id, packet_t packet)1555 ip_process_packet(device_id_t device_id, packet_t *packet) 1556 1556 { 1557 1557 ip_header_t *header; … … 1715 1715 static int 1716 1716 ip_received_error_msg_local(int ip_phone, device_id_t device_id, 1717 packet_t packet, services_t target, services_t error)1717 packet_t *packet, services_t target, services_t error) 1718 1718 { 1719 1719 uint8_t *data; … … 1859 1859 * @return ENOMEM if there is not enough memory left. 1860 1860 */ 1861 static int ip_receive_message(device_id_t device_id, packet_t packet)1862 { 1863 packet_t next;1861 static int ip_receive_message(device_id_t device_id, packet_t *packet) 1862 { 1863 packet_t *next; 1864 1864 1865 1865 do { … … 1890 1890 int *answer_count) 1891 1891 { 1892 packet_t packet;1892 packet_t *packet; 1893 1893 struct sockaddr *addr; 1894 1894 size_t addrlen; -
uspace/srv/net/netif/lo/lo.c
rfdbc3ff r46d4d9f 185 185 } 186 186 187 int netif_send_message(device_id_t device_id, packet_t packet, services_t sender)187 int netif_send_message(device_id_t device_id, packet_t *packet, services_t sender) 188 188 { 189 189 netif_device_t *device; 190 190 size_t length; 191 packet_t next;191 packet_t *next; 192 192 int phone; 193 193 int rc; -
uspace/srv/net/nil/eth/eth.c
rfdbc3ff r46d4d9f 234 234 static void eth_receiver(ipc_callid_t iid, ipc_call_t *icall) 235 235 { 236 packet_t packet;236 packet_t *packet; 237 237 int rc; 238 238 … … 429 429 * @return NULL if the packet address length is not big enough. 430 430 */ 431 static eth_proto_t *eth_process_packet(int flags, packet_t packet)431 static eth_proto_t *eth_process_packet(int flags, packet_t *packet) 432 432 { 433 433 eth_header_snap_t *header; … … 509 509 510 510 int nil_received_msg_local(int nil_phone, device_id_t device_id, 511 packet_t packet, services_t target)511 packet_t *packet, services_t target) 512 512 { 513 513 eth_proto_t *proto; 514 packet_t next;514 packet_t *next; 515 515 eth_device_t *device; 516 516 int flags; … … 680 680 */ 681 681 static int 682 eth_prepare_packet(int flags, packet_t packet, uint8_t *src_addr, int ethertype,682 eth_prepare_packet(int flags, packet_t *packet, uint8_t *src_addr, int ethertype, 683 683 size_t mtu) 684 684 { … … 787 787 * @return EINVAL if the service parameter is not known. 788 788 */ 789 static int eth_send_message(device_id_t device_id, packet_t packet,789 static int eth_send_message(device_id_t device_id, packet_t *packet, 790 790 services_t sender) 791 791 { 792 792 eth_device_t *device; 793 packet_t next;794 packet_t tmp;793 packet_t *next; 794 packet_t *tmp; 795 795 int ethertype; 796 796 int rc; … … 841 841 { 842 842 measured_string_t *address; 843 packet_t packet;843 packet_t *packet; 844 844 size_t addrlen; 845 845 size_t prefix; -
uspace/srv/net/nil/nildummy/nildummy.c
rfdbc3ff r46d4d9f 106 106 static void nildummy_receiver(ipc_callid_t iid, ipc_call_t *icall) 107 107 { 108 packet_t packet;108 packet_t *packet; 109 109 int rc; 110 110 … … 304 304 305 305 int nil_received_msg_local(int nil_phone, device_id_t device_id, 306 packet_t packet, services_t target)307 { 308 packet_t next;306 packet_t *packet, services_t target) 307 { 308 packet_t *next; 309 309 310 310 fibril_rwlock_read_lock(&nildummy_globals.protos_lock); … … 354 354 * @return EINVAL if the service parameter is not known. 355 355 */ 356 static int nildummy_send_message(device_id_t device_id, packet_t packet,356 static int nildummy_send_message(device_id_t device_id, packet_t *packet, 357 357 services_t sender) 358 358 { … … 378 378 { 379 379 measured_string_t *address; 380 packet_t packet;380 packet_t *packet; 381 381 size_t addrlen; 382 382 size_t prefix; -
uspace/srv/net/tl/icmp/icmp.c
rfdbc3ff r46d4d9f 130 130 * @return The result parameter. 131 131 */ 132 static int icmp_release_and_return(packet_t packet, int result)132 static int icmp_release_and_return(packet_t *packet, int result) 133 133 { 134 134 pq_release_remote(icmp_globals.net_phone, packet_get_id(packet)); … … 155 155 * @return EPERM if the error message is not allowed. 156 156 */ 157 static int icmp_send_packet(icmp_type_t type, icmp_code_t code, packet_t packet,157 static int icmp_send_packet(icmp_type_t type, icmp_code_t code, packet_t *packet, 158 158 icmp_header_t *header, services_t error, ip_ttl_t ttl, ip_tos_t tos, 159 159 int dont_fragment) … … 189 189 * @return NULL on errors. 190 190 */ 191 static icmp_header_t *icmp_prepare_packet(packet_t packet)191 static icmp_header_t *icmp_prepare_packet(packet_t *packet) 192 192 { 193 193 icmp_header_t *header; … … 248 248 { 249 249 icmp_header_t *header; 250 packet_t packet;250 packet_t *packet; 251 251 size_t length; 252 252 uint8_t *data; … … 340 340 341 341 static int icmp_destination_unreachable_msg_local(int icmp_phone, 342 icmp_code_t code, icmp_param_t mtu, packet_t packet)342 icmp_code_t code, icmp_param_t mtu, packet_t *packet) 343 343 { 344 344 icmp_header_t *header; … … 355 355 } 356 356 357 static int icmp_source_quench_msg_local(int icmp_phone, packet_t packet)357 static int icmp_source_quench_msg_local(int icmp_phone, packet_t *packet) 358 358 { 359 359 icmp_header_t *header; … … 368 368 369 369 static int icmp_time_exceeded_msg_local(int icmp_phone, icmp_code_t code, 370 packet_t packet)370 packet_t *packet) 371 371 { 372 372 icmp_header_t *header; … … 381 381 382 382 static int icmp_parameter_problem_msg_local(int icmp_phone, icmp_code_t code, 383 icmp_param_t pointer, packet_t packet)383 icmp_param_t pointer, packet_t *packet) 384 384 { 385 385 icmp_header_t *header; … … 479 479 * @param[in] code The received reply message code. 480 480 */ 481 static void icmp_process_echo_reply(packet_t packet, icmp_header_t *header,481 static void icmp_process_echo_reply(packet_t *packet, icmp_header_t *header, 482 482 icmp_type_t type, icmp_code_t code) 483 483 { … … 518 518 * ip_client_process_packet() function. 519 519 */ 520 static int icmp_process_packet(packet_t packet, services_t error)520 static int icmp_process_packet(packet_t *packet, services_t error) 521 521 { 522 522 size_t length; … … 658 658 * icmp_process_packet() function. 659 659 */ 660 static int icmp_received_msg_local(device_id_t device_id, packet_t packet,660 static int icmp_received_msg_local(device_id_t device_id, packet_t *packet, 661 661 services_t receiver, services_t error) 662 662 { … … 690 690 static int icmp_process_message(ipc_call_t *call) 691 691 { 692 packet_t packet;692 packet_t *packet; 693 693 int rc; 694 694 … … 896 896 ipc_call_t *answer, int *answer_count) 897 897 { 898 packet_t packet;898 packet_t *packet; 899 899 int rc; 900 900 -
uspace/srv/net/tl/tcp/tcp.c
rfdbc3ff r46d4d9f 160 160 }; 161 161 162 static int tcp_release_and_return(packet_t , int);162 static int tcp_release_and_return(packet_t *, int); 163 163 static void tcp_prepare_operation_header(socket_core_t *, tcp_socket_data_t *, 164 164 tcp_header_t *, int synchronize, int); … … 171 171 static int tcp_release_after_timeout(void *); 172 172 173 static int tcp_process_packet(device_id_t, packet_t , services_t);173 static int tcp_process_packet(device_id_t, packet_t *, services_t); 174 174 static int tcp_connect_core(socket_core_t *, socket_cores_t *, 175 175 struct sockaddr *, socklen_t); 176 176 static int tcp_queue_prepare_packet(socket_core_t *, tcp_socket_data_t *, 177 packet_t , size_t);178 static int tcp_queue_packet(socket_core_t *, tcp_socket_data_t *, packet_t ,177 packet_t *, size_t); 178 static int tcp_queue_packet(socket_core_t *, tcp_socket_data_t *, packet_t *, 179 179 size_t); 180 static packet_t tcp_get_packets_to_send(socket_core_t *, tcp_socket_data_t *);181 static void tcp_send_packets(device_id_t, packet_t );180 static packet_t *tcp_get_packets_to_send(socket_core_t *, tcp_socket_data_t *); 181 static void tcp_send_packets(device_id_t, packet_t *); 182 182 183 183 static void tcp_process_acknowledgement(socket_core_t *, tcp_socket_data_t *, 184 184 tcp_header_t *); 185 static packet_t tcp_send_prepare_packet(socket_core_t *, tcp_socket_data_t *,186 packet_t , size_t, size_t);187 static packet_t tcp_prepare_copy(socket_core_t *, tcp_socket_data_t *, packet_t,188 size_t, size_t);185 static packet_t *tcp_send_prepare_packet(socket_core_t *, tcp_socket_data_t *, 186 packet_t *, size_t, size_t); 187 static packet_t *tcp_prepare_copy(socket_core_t *, tcp_socket_data_t *, 188 packet_t *, size_t, size_t); 189 189 /* static */ void tcp_retransmit_packet(socket_core_t *, tcp_socket_data_t *, 190 190 size_t); 191 static int tcp_create_notification_packet(packet_t * , socket_core_t *,191 static int tcp_create_notification_packet(packet_t **, socket_core_t *, 192 192 tcp_socket_data_t *, int, int); 193 193 static void tcp_refresh_socket_data(tcp_socket_data_t *); … … 196 196 197 197 static int tcp_process_listen(socket_core_t *, tcp_socket_data_t *, 198 tcp_header_t *, packet_t , struct sockaddr *, struct sockaddr *, size_t);198 tcp_header_t *, packet_t *, struct sockaddr *, struct sockaddr *, size_t); 199 199 static int tcp_process_syn_sent(socket_core_t *, tcp_socket_data_t *, 200 tcp_header_t *, packet_t );200 tcp_header_t *, packet_t *); 201 201 static int tcp_process_syn_received(socket_core_t *, tcp_socket_data_t *, 202 tcp_header_t *, packet_t );202 tcp_header_t *, packet_t *); 203 203 static int tcp_process_established(socket_core_t *, tcp_socket_data_t *, 204 tcp_header_t *, packet_t , int, size_t);204 tcp_header_t *, packet_t *, int, size_t); 205 205 static int tcp_queue_received_packet(socket_core_t *, tcp_socket_data_t *, 206 packet_t , int, size_t);207 208 static int tcp_received_msg(device_id_t, packet_t , services_t, services_t);206 packet_t *, int, size_t); 207 208 static int tcp_received_msg(device_id_t, packet_t *, services_t, services_t); 209 209 static int tcp_process_client_messages(ipc_callid_t, ipc_call_t); 210 210 … … 262 262 } 263 263 264 int tcp_received_msg(device_id_t device_id, packet_t packet,264 int tcp_received_msg(device_id_t device_id, packet_t *packet, 265 265 services_t receiver, services_t error) 266 266 { … … 280 280 } 281 281 282 int tcp_process_packet(device_id_t device_id, packet_t packet, services_t error)282 int tcp_process_packet(device_id_t device_id, packet_t *packet, services_t error) 283 283 { 284 284 size_t length; … … 288 288 socket_core_t *socket; 289 289 tcp_socket_data_t *socket_data; 290 packet_t next_packet;290 packet_t *next_packet; 291 291 size_t total_length; 292 292 uint32_t checksum; … … 493 493 494 494 int tcp_process_established(socket_core_t *socket, tcp_socket_data_t * 495 socket_data, tcp_header_t *header, packet_t packet, int fragments,495 socket_data, tcp_header_t *header, packet_t *packet, int fragments, 496 496 size_t total_length) 497 497 { 498 packet_t next_packet;499 packet_t tmp_packet;498 packet_t *next_packet; 499 packet_t *tmp_packet; 500 500 uint32_t old_incoming; 501 501 size_t order; … … 801 801 802 802 int tcp_queue_received_packet(socket_core_t *socket, 803 tcp_socket_data_t *socket_data, packet_t packet, int fragments,803 tcp_socket_data_t *socket_data, packet_t *packet, int fragments, 804 804 size_t total_length) 805 805 { … … 838 838 839 839 int tcp_process_syn_sent(socket_core_t *socket, tcp_socket_data_t * 840 socket_data, tcp_header_t *header, packet_t packet)841 { 842 packet_t next_packet;840 socket_data, tcp_header_t *header, packet_t *packet) 841 { 842 packet_t *next_packet; 843 843 int rc; 844 844 … … 897 897 int tcp_process_listen(socket_core_t *listening_socket, 898 898 tcp_socket_data_t *listening_socket_data, tcp_header_t *header, 899 packet_t packet, struct sockaddr *src, struct sockaddr *dest,899 packet_t *packet, struct sockaddr *src, struct sockaddr *dest, 900 900 size_t addrlen) 901 901 { 902 packet_t next_packet;902 packet_t *next_packet; 903 903 socket_core_t *socket; 904 904 tcp_socket_data_t *socket_data; … … 1056 1056 1057 1057 int tcp_process_syn_received(socket_core_t *socket, 1058 tcp_socket_data_t *socket_data, tcp_header_t *header, packet_t packet)1058 tcp_socket_data_t *socket_data, tcp_header_t *header, packet_t *packet) 1059 1059 { 1060 1060 socket_core_t *listening_socket; … … 1127 1127 size_t number; 1128 1128 size_t length; 1129 packet_t packet;1130 packet_t next;1131 packet_t acknowledged = NULL;1129 packet_t *packet; 1130 packet_t *next; 1131 packet_t *acknowledged = NULL; 1132 1132 uint32_t old; 1133 1133 … … 1232 1232 ipc_call_t *answer, int *answer_count) 1233 1233 { 1234 packet_t packet;1234 packet_t *packet; 1235 1235 int rc; 1236 1236 … … 1654 1654 socket_data, size_t sequence_number) 1655 1655 { 1656 packet_t packet;1657 packet_t copy;1656 packet_t *packet; 1657 packet_t *copy; 1658 1658 size_t data_length; 1659 1659 … … 1736 1736 { 1737 1737 tcp_socket_data_t *socket_data; 1738 packet_t packet;1738 packet_t *packet; 1739 1739 int rc; 1740 1740 … … 1824 1824 1825 1825 int tcp_queue_prepare_packet(socket_core_t *socket, 1826 tcp_socket_data_t *socket_data, packet_t packet, size_t data_length)1826 tcp_socket_data_t *socket_data, packet_t *packet, size_t data_length) 1827 1827 { 1828 1828 tcp_header_t *header; … … 1855 1855 1856 1856 int tcp_queue_packet(socket_core_t *socket, tcp_socket_data_t *socket_data, 1857 packet_t packet, size_t data_length)1857 packet_t *packet, size_t data_length) 1858 1858 { 1859 1859 int rc; … … 1876 1876 } 1877 1877 1878 packet_t tcp_get_packets_to_send(socket_core_t *socket, tcp_socket_data_t *1878 packet_t *tcp_get_packets_to_send(socket_core_t *socket, tcp_socket_data_t * 1879 1879 socket_data) 1880 1880 { 1881 packet_t packet;1882 packet_t copy;1883 packet_t sending = NULL;1884 packet_t previous = NULL;1881 packet_t *packet; 1882 packet_t *copy; 1883 packet_t *sending = NULL; 1884 packet_t *previous = NULL; 1885 1885 size_t data_length; 1886 1886 int rc; … … 1936 1936 } 1937 1937 1938 packet_t tcp_send_prepare_packet(socket_core_t *socket, tcp_socket_data_t *1939 socket_data, packet_t packet, size_t data_length, size_t sequence_number)1938 packet_t *tcp_send_prepare_packet(socket_core_t *socket, tcp_socket_data_t * 1939 socket_data, packet_t *packet, size_t data_length, size_t sequence_number) 1940 1940 { 1941 1941 tcp_header_t *header; … … 1997 1997 } 1998 1998 1999 packet_t tcp_prepare_copy(socket_core_t *socket, tcp_socket_data_t *2000 socket_data, packet_t packet, size_t data_length, size_t sequence_number)2001 { 2002 packet_t copy;1999 packet_t *tcp_prepare_copy(socket_core_t *socket, tcp_socket_data_t * 2000 socket_data, packet_t *packet, size_t data_length, size_t sequence_number) 2001 { 2002 packet_t *copy; 2003 2003 2004 2004 assert(socket); … … 2015 2015 } 2016 2016 2017 void tcp_send_packets(device_id_t device_id, packet_t packet)2018 { 2019 packet_t next;2017 void tcp_send_packets(device_id_t device_id, packet_t *packet) 2018 { 2019 packet_t *next; 2020 2020 2021 2021 while (packet) { … … 2097 2097 tcp_socket_data_t *socket_data; 2098 2098 int packet_id; 2099 packet_t packet;2099 packet_t *packet; 2100 2100 size_t length; 2101 2101 int rc; … … 2155 2155 tcp_socket_data_t *socket_data; 2156 2156 packet_dimension_t *packet_dimension; 2157 packet_t packet;2157 packet_t *packet; 2158 2158 size_t total_length; 2159 2159 tcp_header_t *header; … … 2229 2229 socket_core_t *socket; 2230 2230 tcp_socket_data_t *socket_data; 2231 packet_t packet;2231 packet_t *packet; 2232 2232 int rc; 2233 2233 … … 2293 2293 } 2294 2294 2295 int tcp_create_notification_packet(packet_t * packet, socket_core_t *socket,2295 int tcp_create_notification_packet(packet_t **packet, socket_core_t *socket, 2296 2296 tcp_socket_data_t *socket_data, int synchronize, int finalize) 2297 2297 { … … 2442 2442 * @return The result parameter. 2443 2443 */ 2444 int tcp_release_and_return(packet_t packet, int result)2444 int tcp_release_and_return(packet_t *packet, int result) 2445 2445 { 2446 2446 pq_release_remote(tcp_globals.net_phone, packet_get_id(packet)); -
uspace/srv/net/tl/tcp/tcp.h
rfdbc3ff r46d4d9f 239 239 * Packets metric is set as their data length. 240 240 */ 241 packet_t incoming;241 packet_t *incoming; 242 242 243 243 /** Outgoing packet queue. … … 249 249 * Packets metric is set as their data length. 250 250 */ 251 packet_t outgoing;251 packet_t *outgoing; 252 252 253 253 /** IP pseudo header. */ -
uspace/srv/net/tl/udp/udp.c
rfdbc3ff r46d4d9f 190 190 * @return The result parameter. 191 191 */ 192 static int udp_release_and_return(packet_t packet, int result)192 static int udp_release_and_return(packet_t *packet, int result) 193 193 { 194 194 pq_release_remote(udp_globals.net_phone, packet_get_id(packet)); … … 217 217 * ip_client_process_packet() function. 218 218 */ 219 static int udp_process_packet(device_id_t device_id, packet_t packet,219 static int udp_process_packet(device_id_t device_id, packet_t *packet, 220 220 services_t error) 221 221 { … … 225 225 udp_header_t *header; 226 226 socket_core_t *socket; 227 packet_t next_packet;227 packet_t *next_packet; 228 228 size_t total_length; 229 229 uint32_t checksum; 230 230 int fragments; 231 packet_t tmp_packet;231 packet_t *tmp_packet; 232 232 icmp_type_t type; 233 233 icmp_code_t code; … … 413 413 * udp_process_packet() function. 414 414 */ 415 static int udp_received_msg(device_id_t device_id, packet_t packet,415 static int udp_received_msg(device_id_t device_id, packet_t *packet, 416 416 services_t receiver, services_t error) 417 417 { … … 458 458 { 459 459 socket_core_t *socket; 460 packet_t packet;461 packet_t next_packet;460 packet_t *packet; 461 packet_t *next_packet; 462 462 udp_header_t *header; 463 463 int index; … … 614 614 socket_core_t *socket; 615 615 int packet_id; 616 packet_t packet;616 packet_t *packet; 617 617 udp_header_t *header; 618 618 struct sockaddr *addr; … … 861 861 ipc_call_t *answer, int *answer_count) 862 862 { 863 packet_t packet;863 packet_t *packet; 864 864 int rc; 865 865
Note:
See TracChangeset
for help on using the changeset viewer.