Changeset 7f95c904 in mainline for uspace/srv/inet/pdu.c
- Timestamp:
- 2012-04-16T07:04:19Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7fda2e0
- Parents:
- 347768d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/inet/pdu.c
r347768d r7f95c904 201 201 uint8_t version; 202 202 uint16_t ident; 203 uint16_t flags_foff; 204 uint16_t foff; 203 205 204 206 log_msg(LVL_DEBUG, "inet_pdu_decode()"); … … 231 233 232 234 ident = uint16_t_be2host(hdr->id); 233 (void)ident;234 /* XXX Flags */235 /* XXX Fragment offset */235 flags_foff = uint16_t_be2host(hdr->flags_foff); 236 foff = BIT_RANGE_EXTRACT(uint16_t, FF_FRAGOFF_h, FF_FRAGOFF_l, 237 flags_foff); 236 238 /* XXX Checksum */ 237 239 … … 241 243 packet->proto = hdr->proto; 242 244 packet->ttl = hdr->ttl; 243 packet->df = (uint16_t_be2host(hdr->tos) & BIT_V(uint16_t, FF_FLAG_DF)) 244 ? 1 : 0; 245 packet->ident = ident; 246 247 packet->df = (flags_foff & BIT_V(uint16_t, FF_FLAG_DF)) != 0; 248 packet->mf = (flags_foff & BIT_V(uint16_t, FF_FLAG_MF)) != 0; 249 packet->offs = foff * FRAG_OFFS_UNIT; 245 250 246 251 /* XXX IP options */
Note:
See TracChangeset
for help on using the changeset viewer.