Changeset 6896409c in mainline for uspace/srv/net/tl/tcp/header.c
- Timestamp:
- 2011-11-21T22:46:37Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1812a0d
- Parents:
- eea65f4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/tl/tcp/header.c
reea65f4 r6896409c 35 35 */ 36 36 37 #include <bitops.h> 37 38 #include <byteorder.h> 38 39 #include <errno.h> … … 41 42 #include "header.h" 42 43 #include "segment.h" 44 #include "seq_no.h" 43 45 #include "std.h" 44 46 #include "tcp_type.h" … … 73 75 ctl = 0; 74 76 75 if ((doff_flags & DF_URG) != 0)77 if ((doff_flags & BIT_V(uint16_t, DF_URG)) != 0) 76 78 ctl |= 0 /* XXX */; 77 if ((doff_flags & DF_ACK) != 0)79 if ((doff_flags & BIT_V(uint16_t, DF_ACK)) != 0) 78 80 ctl |= CTL_ACK; 79 if ((doff_flags & DF_PSH) != 0)81 if ((doff_flags & BIT_V(uint16_t, DF_PSH)) != 0) 80 82 ctl |= 0 /* XXX */; 81 if ((doff_flags & DF_RST) != 0)83 if ((doff_flags & BIT_V(uint16_t, DF_RST)) != 0) 82 84 ctl |= CTL_RST; 83 if ((doff_flags & DF_SYN) != 0)85 if ((doff_flags & BIT_V(uint16_t, DF_SYN)) != 0) 84 86 ctl |= CTL_SYN; 85 if ((doff_flags & DF_FIN) != 0)87 if ((doff_flags & BIT_V(uint16_t, DF_FIN)) != 0) 86 88 ctl |= CTL_FIN; 87 89 … … 97 99 98 100 if ((ctl & CTL_ACK) != 0) 99 doff_flags |= DF_ACK;101 doff_flags |= BIT_V(uint16_t, DF_ACK); 100 102 if ((ctl & CTL_RST) != 0) 101 doff_flags |= DF_RST;103 doff_flags |= BIT_V(uint16_t, DF_RST); 102 104 if ((ctl & CTL_SYN) != 0) 103 doff_flags |= DF_SYN;105 doff_flags |= BIT_V(uint16_t, DF_SYN); 104 106 if ((ctl & CTL_FIN) != 0) 105 doff_flags |= DF_FIN;107 doff_flags |= BIT_V(uint16_t, DF_FIN); 106 108 107 109 *rdoff_flags = doff_flags; … … 203 205 204 206 tcp_header_decode(pdu->header, nseg); 207 nseg->len += seq_no_control_len(nseg->ctrl); 205 208 206 209 hdr = (tcp_header_t *)pdu->header;
Note:
See TracChangeset
for help on using the changeset viewer.