Changes in uspace/srv/net/tl/icmp/icmp.c [ffaba00:f1938c6] in mainline
- File:
-
- 1 edited
-
uspace/srv/net/tl/icmp/icmp.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/tl/icmp/icmp.c
rffaba00 rf1938c6 123 123 static bool error_reporting = true; 124 124 static bool echo_replying = true; 125 static packet_dimension_t icmp_dimension;126 125 127 126 /** ICMP client identification counter */ 128 127 static atomic_t icmp_client; 129 130 /** ICMP identifier and sequence number (client-specific) */ 128 static packet_dimension_t icmp_dimension; 129 130 /** ICMP identifier and sequence number */ 131 131 static fibril_local icmp_param_t icmp_id; 132 132 static fibril_local icmp_param_t icmp_seq; … … 142 142 * are 16-bit values. 143 143 */ 144 hash_index_t index = ( (key[0] & 0xffff) << 16)| (key[1] & 0xffff);145 return (index % REPLY_BUCKETS);144 hash_index_t index = (key[0] & 0xffff) << 16 | (key[1] & 0xffff); 145 return index % REPLY_BUCKETS; 146 146 } 147 147 … … 209 209 header->type = type; 210 210 header->code = code; 211 212 /*213 * The checksum needs to be calculated214 * with a virtual checksum field set to215 * zero.216 */217 211 header->checksum = 0; 218 212 header->checksum = ICMP_CHECKSUM(header, … … 287 281 * zero. 288 282 * @return ENOMEM if there is not enough memory left. 283 * @return EPARTY if there was an internal error. 289 284 * 290 285 */ … … 333 328 } 334 329 335 bzero(header, sizeof( icmp_header_t));330 bzero(header, sizeof(*header)); 336 331 header->un.echo.identifier = id; 337 332 header->un.echo.sequence_number = sequence; … … 444 439 unsigned long key[REPLY_KEYS] = 445 440 {header->un.echo.identifier, header->un.echo.sequence_number}; 446 447 /* The packet is no longer needed */448 441 icmp_release(packet); 449 442 … … 705 698 /** Per-connection initialization 706 699 * 707 * Initialize client-specific global variables.708 *709 700 */ 710 701 void tl_connection(void)
Note:
See TracChangeset
for help on using the changeset viewer.
