linklayerprotocols/pppnif/te_ppp/te_vjcomp/config/TCSIM/t_vjuncomp_20.tcsim
changeset 0 af10295192d8
child 1 a579325b79dd
equal deleted inserted replaced
-1:000000000000 0:af10295192d8
       
     1 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of the License "Symbian Foundation License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // T_VJUNCOMP_20
       
    15 // Reserved bits are set
       
    16 // tcsim input file to generate test data for VJ compression tests.
       
    17 // 
       
    18 //
       
    19 
       
    20 #include "packet.def"
       
    21 #include "ports.tc"
       
    22 
       
    23 // This is a version of TCP_HDR from packet4.def that includes support
       
    24 // for setting the TCP reserved fields in the data offset octet with
       
    25 // $tcp_reserved
       
    26 #define TCP_HDR_IMPROVED(params) \
       
    27 			/* source port, REQUIRED			*/ \
       
    28 			/* destination port, REQUIRED			*/ \
       
    29   $tcp_seq = 0		/* sequence number				*/ \
       
    30   $tcp_ack = 0		/* acknowledgement number			*/ \
       
    31   $tcp_off = 5		/* data offset (5 for "no options")		*/ \
       
    32   $tcp_flags = 0	/* tcp flags					*/ \
       
    33   $tcp_URG = 0		/*   URG					*/ \
       
    34   $tcp_ACK = 0		/*   ACK					*/ \
       
    35   $tcp_PSH = 0		/*   PSH					*/ \
       
    36   $tcp_RST = 0		/*   RST					*/ \
       
    37   $tcp_SYN = 0		/*   SYN					*/ \
       
    38   $tcp_FIN = 0		/*   FIN					*/ \
       
    39   $tcp_win = 0		/* window					*/ \
       
    40   $tcp_sum = 0		/* checksum					*/ \
       
    41   $tcp_urp = 0		/* urgent pointer				*/ \
       
    42   $tcp_reserved = 0	/* reserved				*/ \
       
    43 									\
       
    44   params								\
       
    45 									\
       
    46   /* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+	*/ \
       
    47   /* |          Source Port          |       Destination Port        |	*/ \
       
    48   /* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+	*/ \
       
    49 									\
       
    50   ns: $tcp_sport							\
       
    51   ns: $tcp_dport							\
       
    52 									\
       
    53   /* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+	*/ \
       
    54   /* |                        Sequence Number                        |	*/ \
       
    55   /* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+	*/ \
       
    56 									\
       
    57   nl: $tcp_seq								\
       
    58 									\
       
    59   /* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+	*/ \
       
    60   /* |                    Acknowledgment Number                      |	*/ \
       
    61   /* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+	*/ \
       
    62 									\
       
    63   nl: $tcp_ack								\
       
    64 									\
       
    65   /* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+	*/ \
       
    66   /* |  Data |           |U|A|P|R|S|F|                               |	*/ \
       
    67   /* | Offset| Reserved  |R|C|S|S|Y|I|            Window             |	*/ \
       
    68   /* |       |           |G|K|H|T|N|N|                               |	*/ \
       
    69   /* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+	*/ \
       
    70 									\
       
    71   ($tcp_off << 4) | $tcp_reserved 					\
       
    72   ($tcp_URG << 5) | ($tcp_ACK << 4) | ($tcp_PSH << 3) |			\
       
    73     ($tcp_RST << 2) | ($tcp_SYN << 1) | $tcp_FIN | $tcp_flags		\
       
    74   ns: $tcp_win								\
       
    75 									\
       
    76   /* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+	*/ \
       
    77   /* |           Checksum            |         Urgent Pointer        |	*/ \
       
    78   /* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+	*/ \
       
    79 									\
       
    80   ns: $tcp_sum								\
       
    81   ns: $tcp_urp								\
       
    82 									\
       
    83   /* ----- End of header ----- */
       
    84 
       
    85 dev eth0 100 Mbps {
       
    86     egress {
       
    87     }
       
    88 }
       
    89 
       
    90 // Packet to prime the compressor
       
    91 send TCP_PCK($ip_id=1 $ip_sum=0x66cc $tcp_sport = PORT_FTP_DATA $tcp_dport = 1234 $tcp_ACK=1 $tcp_seq=0 $tcp_sum=0x65eb)
       
    92      0x31
       
    93 
       
    94 // Packet with TCP reserved bit 0 set
       
    95 send IP_HDR($ip_proto = IPPROTO_TCP $ip_id=2 $ip_sum=0x66cb)
       
    96     TCP_HDR_IMPROVED($tcp_sport = PORT_FTP_DATA $tcp_dport = 1234 $tcp_ACK=1 $tcp_seq=1 $tcp_reserved=1 $tcp_sum=0x63ea)
       
    97      0x32
       
    98 
       
    99 // Packet with TCP reserved bit 3 set
       
   100 send IP_HDR($ip_proto = IPPROTO_TCP $ip_id=3 $ip_sum=0x66ca)
       
   101     TCP_HDR_IMPROVED($tcp_sport = PORT_FTP_DATA $tcp_dport = 1234 $tcp_ACK=1 $tcp_seq=1 $tcp_reserved=4 $tcp_sum=0x60ea)
       
   102      0x32
       
   103 
       
   104 
       
   105 end