Changeset 1d24ad3 in mainline for uspace/srv/net/udp/pdu.c
- Timestamp:
- 2013-07-03T14:20:04Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d8b47eca
- Parents:
- 02a09ed
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/udp/pdu.c
r02a09ed r1d24ad3 85 85 } 86 86 87 static uint16_t udp_phdr_setup(udp_pdu_t *pdu, udp_phdr_t *phdr) 87 static uint16_t udp_phdr_setup(udp_pdu_t *pdu, udp_phdr_t *phdr, 88 udp_phdr6_t *phdr6) 88 89 { 89 90 addr32_t src_v4; … … 106 107 break; 107 108 case AF_INET6: 108 // FIXME TODO 109 assert(false); 109 host2addr128_t_be(src_v6, phdr6->src_addr); 110 host2addr128_t_be(dest_v6, phdr6->dest_addr); 111 phdr6->udp_length = host2uint32_t_be(pdu->data_size); 112 memset(phdr6->zero, 0, 3); 113 phdr6->next = IP_PROTO_UDP; 114 break; 110 115 default: 111 116 assert(false); … … 130 135 uint16_t cs_phdr; 131 136 udp_phdr_t phdr; 132 133 uint16_t af = udp_phdr_setup(pdu, &phdr); 137 udp_phdr6_t phdr6; 138 139 uint16_t af = udp_phdr_setup(pdu, &phdr, &phdr6); 134 140 switch (af) { 135 141 case AF_INET: … … 138 144 break; 139 145 case AF_INET6: 140 // FIXME TODO 141 assert(false); 146 cs_phdr = udp_checksum_calc(UDP_CHECKSUM_INIT, (void *) &phdr6, 147 sizeof(udp_phdr6_t)); 148 break; 142 149 default: 143 150 assert(false);
Note:
See TracChangeset
for help on using the changeset viewer.