Help with "calculate the checksum of ip fragmentation" - TCP-IP

This is a discussion on Help with "calculate the checksum of ip fragmentation" - TCP-IP ; what can i do when I calculate for every fragmentation? the fragmentation below like Fragment # Offset Length MF F1 0 16 1 F2 16 16 1 F3 32 16 0 Now I don't know how send F1 using raw ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Help with "calculate the checksum of ip fragmentation"

  1. Help with "calculate the checksum of ip fragmentation"

    what can i do when I calculate for every fragmentation?

    the fragmentation below like
    Fragment # Offset Length MF
    F1 0 16 1
    F2 16 16 1
    F3 32 16 0

    Now I don't know how send F1 using raw socket tcp .
    as tcp checksum here :
    pseudo includes the whole tcpheader, but every f1 doesn't contain the
    whole tcpheader...
    so you know
    it can't be send.

    ========
    here still another question
    I using tcp raw socket to succeed in sending a complete tcp packet.
    a tcp packet includes ( 20 bytes IP header, 20 bytes Tcpheader, 8
    bytes padding ) using sendto()
    I can use tcpdump to capture this packet in the destination host.
    but sendto() return value always zero ,
    why not 8 bytes here?


  2. Re: Help with "calculate the checksum of ip fragmentation"

    In article <1149997807.897860.100880@h76g2000cwa.googlegroups. com>,
    "wikiccìIóØåæïÎ" wrote:

    > what can i do when I calculate for every fragmentation?
    >
    > the fragmentation below like
    > Fragment # Offset Length MF
    > F1 0 16 1
    > F2 16 16 1
    > F3 32 16 0
    >
    > Now I don't know how send F1 using raw socket tcp .
    > as tcp checksum here :
    > pseudo includes the whole tcpheader, but every f1 doesn't contain the
    > whole tcpheader...
    > so you know
    > it can't be send.


    You have to compute the TCP checksum before splitting the segment into
    fragments. And on reception, you can't check the checksum until all the
    fragments have been reassembled.

    --
    Barry Margolin, barmar@alum.mit.edu
    Arlington, MA
    *** PLEASE post questions in newsgroups, not directly to me ***
    *** PLEASE don't copy me on replies, I'll read them in the group ***

+ Reply to Thread