Changeset 5f9ecd3 in mainline for uspace/srv/net/tl/tcp/pdu.c


Ignore:
Timestamp:
2011-12-05T22:46:26Z (12 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0ac2158
Parents:
453f9e33
Message:

Send meaningful Data Offset field.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/tl/tcp/pdu.c

    r453f9e33 r5f9ecd3  
    113113{
    114114        uint16_t doff_flags;
     115        uint16_t doff;
    115116
    116117        hdr->src_port = host2uint16_t_be(sp->local.port);
     
    118119        hdr->seq = host2uint32_t_be(seg->seq);
    119120        hdr->ack = host2uint32_t_be(seg->ack);
    120         tcp_header_encode_flags(seg->ctrl, 0, &doff_flags);
     121
     122        doff = (sizeof(tcp_header_t) / sizeof(uint32_t)) << DF_DATA_OFFSET_l;
     123        tcp_header_encode_flags(seg->ctrl, doff, &doff_flags);
     124
    121125        hdr->doff_flags = host2uint16_t_be(doff_flags);
    122126        hdr->window = host2uint16_t_be(seg->wnd);
Note: See TracChangeset for help on using the changeset viewer.