Changes in uspace/srv/net/tl/icmp/icmp.c [4eca056:fb04cba8] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/tl/icmp/icmp.c
r4eca056 rfb04cba8 156 156 */ 157 157 static int icmp_send_packet(icmp_type_t type, icmp_code_t code, packet_t packet, 158 icmp_header_ t *header, services_t error, ip_ttl_t ttl, ip_tos_t tos,158 icmp_header_ref header, services_t error, ip_ttl_t ttl, ip_tos_t tos, 159 159 int dont_fragment) 160 160 { … … 189 189 * @returns NULL on errors. 190 190 */ 191 static icmp_header_ t *icmp_prepare_packet(packet_t packet)192 { 193 icmp_header_ t *header;191 static icmp_header_ref icmp_prepare_packet(packet_t packet) 192 { 193 icmp_header_ref header; 194 194 size_t header_length; 195 195 size_t total_length; … … 247 247 const struct sockaddr * addr, socklen_t addrlen) 248 248 { 249 icmp_header_ t *header;249 icmp_header_ref header; 250 250 packet_t packet; 251 251 size_t length; 252 252 uint8_t *data; 253 icmp_reply_ t *reply;253 icmp_reply_ref reply; 254 254 int reply_key; 255 255 int index; … … 342 342 icmp_code_t code, icmp_param_t mtu, packet_t packet) 343 343 { 344 icmp_header_ t *header;344 icmp_header_ref header; 345 345 346 346 header = icmp_prepare_packet(packet); … … 357 357 static int icmp_source_quench_msg_local(int icmp_phone, packet_t packet) 358 358 { 359 icmp_header_ t *header;359 icmp_header_ref header; 360 360 361 361 header = icmp_prepare_packet(packet); … … 370 370 packet_t packet) 371 371 { 372 icmp_header_ t *header;372 icmp_header_ref header; 373 373 374 374 header = icmp_prepare_packet(packet); … … 383 383 icmp_param_t pointer, packet_t packet) 384 384 { 385 icmp_header_ t *header;385 icmp_header_ref header; 386 386 387 387 header = icmp_prepare_packet(packet); … … 413 413 } 414 414 }; 415 measured_string_ t *configuration;415 measured_string_ref configuration; 416 416 size_t count = sizeof(names) / sizeof(measured_string_t); 417 417 char *data; … … 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_ref header, 482 482 icmp_type_t type, icmp_code_t code) 483 483 { 484 484 int reply_key; 485 icmp_reply_ t *reply;485 icmp_reply_ref reply; 486 486 487 487 /* Compute the reply key */ … … 525 525 int result; 526 526 void *data; 527 icmp_header_ t *header;527 icmp_header_ref header; 528 528 icmp_type_t type; 529 529 icmp_code_t code; … … 567 567 568 568 /* Get ICMP header */ 569 header = (icmp_header_ t *) data;569 header = (icmp_header_ref) data; 570 570 571 571 if (header->checksum) { … … 735 735 * @returns ENOTCONN if no free identifier have been found. 736 736 */ 737 static int icmp_bind_free_id(icmp_echo_ t *echo_data)737 static int icmp_bind_free_id(icmp_echo_ref echo_data) 738 738 { 739 739 icmp_param_t index; … … 791 791 struct sockaddr *addr; 792 792 ipc_callid_t data_callid; 793 icmp_echo_ t *echo_data;793 icmp_echo_ref echo_data; 794 794 int rc = EOK; 795 795 … … 800 800 answer_count = 0; 801 801 802 echo_data = (icmp_echo_ t *) malloc(sizeof(*echo_data));802 echo_data = (icmp_echo_ref) malloc(sizeof(*echo_data)); 803 803 if (!echo_data) 804 804 return ENOMEM;
Note:
See TracChangeset
for help on using the changeset viewer.