File src/tcpipmodel/ProtocolHeaders.msg

Contains:

//
// (C) 2004-2005 by Institute of Telematics, University of Karlsruhe
// (C) 2006 Andras Varga
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
//


message TCPPacket
{
   fields:
      int sourcePort;
      int destPort;
      int flags;
      int seq;
      int ack;
      int wsize;
      int urg;
      int len;
      // int udp_source;
      // int udp_dest;
      // int udp_len;
      // int data_len;
}


message IPPacket
{
    fields:
        int version;
        int tos;
        int sourceAddress;
        int destAddress;
        int protocol;
        string data;
        int data_len;
};

message IPHeader
{
     properties:
       customize = true;
     fields:
       abstract char   hl;
       abstract int    tos;
       abstract int    len;
       abstract int    id;
       abstract int    off;
       abstract int    ttl;
       abstract int    p;
       abstract int    sum;
       abstract string src;
       abstract string dst;
}

message TCPHeader
{
     properties:
       customize = true;
     fields:
       abstract unsigned short   s_port;
       abstract unsigned short   d_port;
       abstract unsigned long    seq;
       abstract unsigned long    ack;
       abstract unsigned char    off;
       abstract unsigned short   win;
       abstract unsigned short   sum;
       abstract unsigned short   urp;
       abstract string           flags;
       abstract string           options;
       abstract unsigned int     dataLen;
}

message ICMPHeader
{
     properties:
       customize = true;
     fields:
       abstract unsigned char  type;
       abstract unsigned char  code;
       abstract unsigned short cksum;

}

message ARPHeader
{
     properties:
       customize = true;
     fields:
       abstract string  op;

       abstract string  sha;
       abstract string  spa;
       abstract string  tha;
       abstract string  tpa;
};

message EtherHeader
{
     properties:
       customize = true;
     fields:
       abstract string da;
       abstract string sa;
       abstract unsigned short type;
}