Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members  

protocol.h

00001 //==========================================================================
00002 //   PROTOCOL.H - header for
00003 //                             OMNeT++
00004 //            Discrete System Simulation in C++
00005 //
00006 //
00007 //  Protocol and PDU type enums for cPacket
00008 //
00009 //  Author: Andras Varga
00010 //
00011 //==========================================================================
00012 
00013 /*--------------------------------------------------------------*
00014   Copyright (C) 1992-2001 Andras Varga
00015   Technical University of Budapest, Dept. of Telecommunications,
00016   Stoczek u.2, H-1111 Budapest, Hungary.
00017 
00018   This file is distributed WITHOUT ANY WARRANTY. See the file
00019   `license' for details on this and other legal matters.
00020 *--------------------------------------------------------------*/
00021 
00022 #ifndef __PROTOCOL_H
00023 #define __PROTOCOL_H
00024 
00025 
00026 //
00027 // The cPacket class is intended to be the base class for models of
00028 // network packets/frames. cPacket has a protocol() and a pdu() field.
00029 //
00030 // This file is an initial try to collect protocols and frame/packet
00031 // types and assign ids to them, for use with cPacket. The aim is
00032 // to standardize on protocol models.
00033 //
00034 // Hopefully these enum lists will grow as people develop models and
00035 // send in new protocol codes.
00036 //
00037 //
00038 // THE cPacket CLASS AS WELL AS THIS FILE IS EXPERIMENTAL.
00039 // PLEASE GIVE SOME FEEDBACK.
00040 //
00041 
00042 
00043 //
00044 // protocols
00045 //
00046 // Protocol codes are now grouped by the OSI seven layers. I know OSI is
00047 // kind of obsolete, but does anyone know a better scheme?
00048 // Or better, a whole complete list of protocols with assigned numbers
00049 // (like the list protocol codes that identify the embedded protocol
00050 // in an ethernet frame). Write if you have an idea!
00051 //
00052 enum {
00053 
00054    // physical
00055    // starting at 1000
00056 
00057    // data-link
00058    PR_ETHERNET = 2000,
00059    PR_FDDI,
00060    PR_TOKENRING,
00061    PR_LAPB,
00062    PR_PPP,
00063 
00064    // network
00065    PR_IP = 3000,
00066    PR_ICMP,
00067    PR_IPV6,
00068    PR_CLNP,
00069    PR_X25,
00070 
00071    // transport
00072    PR_TCP = 4000,
00073    PR_UDP,
00074    PR_TP4,
00075 
00076    // session
00077    // starting at 5000
00078 
00079    // presentation
00080    PR_SSL = 6000,
00081 
00082    // application
00083    PR_TELNET = 7000,
00084    PR_HTTP,
00085    PR_SMTP,
00086    PR_POP3,
00087    PR_UDP_APP,
00088    PR_NFS,
00089    PR_XWINDOW
00090 
00091    // ATM
00092    // starting at 8000
00093 
00094    // ...
00095 };
00096 
00097 
00098 //
00099 // PDU (frame,packet,etc) types
00100 //
00101 // The enum names should reflect the PURPOSE of the frame/packet type and
00102 // not the specific name in one protocol. For example, I prefer
00103 // PDU_CONNECT_REQUEST to PDU_LAPB_SABME or PDU_TP4_CR.
00104 //
00105 // Using generic PDU type names will make it easier to write more general
00106 // and easier-to-reuse protocol models.
00107 //
00108 // Additions, corrections welcome!
00109 //
00110 enum {
00111 
00112    PDU_CONNECT_REQUEST,
00113    PDU_CONNECT_CONFIRM,
00114    PDU_DATA,
00115    PDU_EXPEDITED_DATA,
00116    PDU_ACK,
00117    PDU_DISCONNECT_REQUEST,
00118    PDU_DISCONNECT_CONFIRM
00119    //...
00120 };
00121 
00122 #endif

Generated at Sat May 4 15:45:49 2002 for OMNeT++ by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001