Changeset 91478aa in mainline for uspace/srv/net/tl
- Timestamp:
- 2010-02-17T23:20:41Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9b87284, ca2d142
- Parents:
- 536ded4
- Location:
- uspace/srv/net/tl
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/tl/icmp/icmp.c
r536ded4 r91478aa 287 287 length = ( size_t ) addrlen; 288 288 // TODO do not ask all the time 289 ERROR_PROPAGATE( ip_packet_size_req( icmp_globals.ip_phone, -1, & icmp_globals. addr_len, & icmp_globals.prefix, & icmp_globals.content, & icmp_globals.suffix));290 packet = packet_get_4( icmp_globals.net_phone, size, icmp_globals. addr_len, ICMP_HEADER_SIZE + icmp_globals.prefix, icmp_globals.suffix );289 ERROR_PROPAGATE( ip_packet_size_req( icmp_globals.ip_phone, -1, & icmp_globals.packet_dimension )); 290 packet = packet_get_4( icmp_globals.net_phone, size, icmp_globals.packet_dimension.addr_len, ICMP_HEADER_SIZE + icmp_globals.packet_dimension.prefix, icmp_globals.packet_dimension.suffix ); 291 291 if( ! packet ) return ENOMEM; 292 292 … … 477 477 return icmp_globals.ip_phone; 478 478 } 479 ERROR_PROPAGATE( ip_packet_size_req( icmp_globals.ip_phone, -1, & icmp_globals. addr_len, & icmp_globals.prefix, & icmp_globals.content, & icmp_globals.suffix));480 icmp_globals.p refix += ICMP_HEADER_SIZE;481 icmp_globals. content -= ICMP_HEADER_SIZE;479 ERROR_PROPAGATE( ip_packet_size_req( icmp_globals.ip_phone, -1, & icmp_globals.packet_dimension )); 480 icmp_globals.packet_dimension.prefix += ICMP_HEADER_SIZE; 481 icmp_globals.packet_dimension.content -= ICMP_HEADER_SIZE; 482 482 // get configuration 483 483 icmp_globals.error_reporting = NET_DEFAULT_ICMP_ERROR_REPORTING; -
uspace/srv/net/tl/icmp/icmp.h
r536ded4 r91478aa 94 94 */ 95 95 int ip_phone; 96 /** Reserved packet prefix length.96 /** Packet dimension. 97 97 */ 98 size_t prefix; 99 /** Maximal packet content length. 100 */ 101 size_t content; 102 /** Reserved packet suffix length. 103 */ 104 size_t suffix; 105 /** Packet address length. 106 */ 107 size_t addr_len; 98 packet_dimension_t packet_dimension; 108 99 /** Networking module phone. 109 100 */ -
uspace/srv/net/tl/tl_common.c
r536ded4 r91478aa 89 89 * packet_dimension = malloc( sizeof( ** packet_dimension )); 90 90 if( ! * packet_dimension ) return ENOMEM; 91 if( ERROR_OCCURRED( ip_packet_size_req( ip_phone, device_id, & ( ** packet_dimension ).addr_len, & ( ** packet_dimension ).prefix, & ( ** packet_dimension ).content, & ( ** packet_dimension ).suffix))){91 if( ERROR_OCCURRED( ip_packet_size_req( ip_phone, device_id, * packet_dimension ))){ 92 92 free( * packet_dimension ); 93 93 return ERROR_CODE; -
uspace/srv/net/tl/tl_common.h
r536ded4 r91478aa 43 43 #include "../include/inet.h" 44 44 #include "../include/socket_codes.h" 45 46 /** Type definition of the packet dimension.47 * @see packet_dimension48 */49 typedef struct packet_dimension packet_dimension_t;50 51 /** Type definition of the packet dimension pointer.52 * @see packet_dimension53 */54 typedef packet_dimension_t * packet_dimension_ref;55 56 /** Packet dimension.57 */58 struct packet_dimension{59 /** Reserved packet prefix length.60 */61 size_t prefix;62 /** Maximal packet content length.63 */64 size_t content;65 /** Reserved packet suffix length.66 */67 size_t suffix;68 /** Maximal packet address length.69 */70 size_t addr_len;71 };72 45 73 46 /** Device packet dimensions. -
uspace/srv/net/tl/udp/udp.c
r536ded4 r91478aa 205 205 } 206 206 // read default packet dimensions 207 ERROR_PROPAGATE( ip_packet_size_req( udp_globals.ip_phone, -1, & udp_globals.packet_dimension .addr_len, & udp_globals.packet_dimension.prefix, & udp_globals.packet_dimension.content, & udp_globals.packet_dimension.suffix));207 ERROR_PROPAGATE( ip_packet_size_req( udp_globals.ip_phone, -1, & udp_globals.packet_dimension )); 208 208 ERROR_PROPAGATE( socket_ports_initialize( & udp_globals.sockets )); 209 209 if( ERROR_OCCURRED( packet_dimensions_initialize( & udp_globals.dimensions ))){ … … 579 579 // }else{ 580 580 // do not ask all the time 581 ERROR_PROPAGATE( ip_packet_size_req( udp_globals.ip_phone, -1, & udp_globals.packet_dimension .addr_len, & udp_globals.packet_dimension.prefix, & udp_globals.packet_dimension.content, & udp_globals.packet_dimension.suffix));581 ERROR_PROPAGATE( ip_packet_size_req( udp_globals.ip_phone, -1, & udp_globals.packet_dimension )); 582 582 packet_dimension = & udp_globals.packet_dimension; 583 583 // }
Note:
See TracChangeset
for help on using the changeset viewer.