Changeset a2d8d59 in mainline for uspace/srv
- Timestamp:
- 2011-01-17T16:26:10Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7e36c8d
- Parents:
- f1938c6 (diff), ffaba00 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/tl/icmp/icmp.c
rf1938c6 ra2d8d59 123 123 static bool error_reporting = true; 124 124 static bool echo_replying = true; 125 static packet_dimension_t icmp_dimension; 125 126 126 127 /** ICMP client identification counter */ 127 128 static atomic_t icmp_client; 128 static packet_dimension_t icmp_dimension; 129 130 /** ICMP identifier and sequence number */ 129 130 /** ICMP identifier and sequence number (client-specific) */ 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 calculated 214 * with a virtual checksum field set to 215 * zero. 216 */ 211 217 header->checksum = 0; 212 218 header->checksum = ICMP_CHECKSUM(header, … … 281 287 * zero. 282 288 * @return ENOMEM if there is not enough memory left. 283 * @return EPARTY if there was an internal error.284 289 * 285 290 */ … … 328 333 } 329 334 330 bzero(header, sizeof( *header));335 bzero(header, sizeof(icmp_header_t)); 331 336 header->un.echo.identifier = id; 332 337 header->un.echo.sequence_number = sequence; … … 439 444 unsigned long key[REPLY_KEYS] = 440 445 {header->un.echo.identifier, header->un.echo.sequence_number}; 446 447 /* The packet is no longer needed */ 441 448 icmp_release(packet); 442 449 … … 698 705 /** Per-connection initialization 699 706 * 707 * Initialize client-specific global variables. 708 * 700 709 */ 701 710 void tl_connection(void)
Note:
See TracChangeset
for help on using the changeset viewer.