Commit e0664f67 authored by garciay's avatar garciay
Browse files

Add TCPv4 support

parent 17eb85e2
Loading
Loading
Loading
Loading
+46 −0
Original line number Diff line number Diff line
/**
 *  @author   STF 440
 *  @version  $Id$
 *  @desc     This module adds definition from RFC 793.
 *  @url      http://www.ietf.org/rfc/rfc1533.txt
 *  
 */
module AtsCommon_Tcpv4_Rfc793_TypesAndValues {
    
    //LibCommon
    import from LibCommon_BasicTypesAndValues all;
    import from LibCommon_DataStrings all;
    
    type record TCPPv4Msg {
        UInt16          srcPort,            // Identifies the sending port
        UInt16          dstPort,            // Identifies the receiving port
        UInt32          seqNumber,
        UInt32          ackNumber optional, // present if ack bit set
        Bit4            dataOffset,         // Specifies the size of the TCP header in 32-bit words
        Bit3            reserved('000'B), 
        TCPv4Flags      flags,              // Aka Control bits
        UInt16          widowSize,          // Size of the receive window
        UInt16          checksum,
        UInt16          urgentPointer,
        octetstring     options length(0..40),
        octetstring     pad optional,
        TCPv4Payload    payload
    } // End of type TCPPv4Msg
    
    type record TCPv4Flags {
        Bit1    ns,     // ECN-nonce concealment protection (added to header by RFC 3540)
        Bit1    cwr,    // Congestion Window Reduced
        Bit1    ece,    // ECN-Echo indicator
        Bit1    urg,    // Urgent Pointer field significant
        Bit1    ack,    // Acknowledgment field significant
        Bit1    psh,    // Push Function
        Bit1    rst,    // Reset the connection
        Bit1    syn,    // Synchronize sequence numbers
        Bit1    fin     // No more data from sender
    } // End of type TCPv4Flags
    
    type union TCPv4Payload {
        octetstring rawPayload
    } // End of type TCPv4Payload
    
} // End of AtsCommon_Tcpv4_Rfc793_TypesAndValues 
 No newline at end of file