Changeset 2ff150e in mainline
- Timestamp:
- 2012-02-13T08:25:46Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 081971b
- Parents:
- fe4310f
- Location:
- uspace
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/nic/e1k/e1k.c
rfe4310f r2ff150e 2309 2309 static void e1000_send_frame(nic_t *nic, void *data, size_t size) 2310 2310 { 2311 printf("e1000_send_frame()\n");2312 2311 assert(nic); 2313 2312 -
uspace/srv/inet/addrobj.c
rfe4310f r2ff150e 125 125 /** Send datagram to directly reachable destination */ 126 126 int inet_addrobj_send_dgram(inet_addrobj_t *addr, inet_dgram_t *dgram, 127 uint8_t ttl, int df)127 uint8_t proto, uint8_t ttl, int df) 128 128 { 129 129 inet_addr_t lsrc_addr; … … 134 134 135 135 return inet_link_send_dgram(addr->ilink, &lsrc_addr, ldest_addr, dgram, 136 ttl, df);136 proto, ttl, df); 137 137 } 138 138 -
uspace/srv/inet/addrobj.h
rfe4310f r2ff150e 53 53 extern inet_addrobj_t *inet_addrobj_find(inet_addr_t *, inet_addrobj_find_t); 54 54 extern int inet_addrobj_send_dgram(inet_addrobj_t *, inet_dgram_t *, 55 uint8_t ttl, int df);55 uint8_t, uint8_t, int); 56 56 57 57 #endif -
uspace/srv/inet/inet.c
rfe4310f r2ff150e 101 101 } 102 102 103 static int inet_route_packet(inet_dgram_t *dgram, uint8_t ttl, int df) 103 static int inet_route_packet(inet_dgram_t *dgram, uint8_t proto, uint8_t ttl, 104 int df) 104 105 { 105 106 inet_addrobj_t *addr; … … 108 109 if (addr != NULL) { 109 110 /* Destination is directly accessible */ 110 return inet_addrobj_send_dgram(addr, dgram, ttl, df);111 return inet_addrobj_send_dgram(addr, dgram, proto, ttl, df); 111 112 } 112 113 … … 117 118 118 119 static int inet_send(inet_client_t *client, inet_dgram_t *dgram, 119 uint8_t ttl, int df)120 { 121 return inet_route_packet(dgram, ttl, df);120 uint8_t proto, uint8_t ttl, int df) 121 { 122 return inet_route_packet(dgram, proto, ttl, df); 122 123 } 123 124 … … 177 178 } 178 179 179 rc = inet_send(client, &dgram, ttl, df);180 rc = inet_send(client, &dgram, client->protocol, ttl, df); 180 181 181 182 free(dgram.data); -
uspace/srv/inet/inet_link.c
rfe4310f r2ff150e 217 217 /** Send datagram over Internet link */ 218 218 int inet_link_send_dgram(inet_link_t *ilink, inet_addr_t *lsrc, 219 inet_addr_t *ldest, inet_dgram_t *dgram, uint8_t ttl, int df)219 inet_addr_t *ldest, inet_dgram_t *dgram, uint8_t proto, uint8_t ttl, int df) 220 220 { 221 221 iplink_sdu_t sdu; … … 227 227 packet.dest = dgram->dest; 228 228 packet.tos = dgram->tos; 229 packet.proto = 42;229 packet.proto = proto; 230 230 packet.ttl = ttl; 231 231 packet.df = df; -
uspace/srv/inet/inet_link.h
rfe4310f r2ff150e 42 42 extern int inet_link_discovery_start(void); 43 43 extern int inet_link_send_dgram(inet_link_t *, inet_addr_t *, 44 inet_addr_t *, inet_dgram_t *, uint8_t, int);44 inet_addr_t *, inet_dgram_t *, uint8_t, uint8_t, int); 45 45 46 46 #endif -
uspace/srv/inet/pdu.c
rfe4310f r2ff150e 73 73 BIT_V(uint16_t, FF_FLAG_DF) : 0); 74 74 hdr->ttl = packet->ttl; 75 hdr->proto = 0;75 hdr->proto = packet->proto; 76 76 hdr->chksum = 0; 77 77 hdr->src_addr = host2uint32_t_be(packet->src.ipv4); … … 125 125 /* XXX Flags */ 126 126 /* XXX Fragment offset */ 127 /* XXX Protocol */128 127 /* XXX Checksum */ 129 128 … … 131 130 packet->dest.ipv4 = uint32_t_be2host(hdr->dest_addr); 132 131 packet->tos = hdr->tos; 132 packet->proto = hdr->proto; 133 133 packet->ttl = hdr->ttl; 134 134 packet->df = (uint16_t_be2host(hdr->tos) & BIT_V(uint16_t, FF_FLAG_DF))
Note:
See TracChangeset
for help on using the changeset viewer.