00001 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ 00002 /* 00003 * Copyright (c) 2005 INRIA 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License version 2 as 00007 * published by the Free Software Foundation; 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00017 * 00018 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr> 00019 */ 00020 00021 #ifndef LLC_SNAP_HEADER_H 00022 #define LLC_SNAP_HEADER_H 00023 00024 #include <stdint.h> 00025 #include <string> 00026 #include "ns3/header.h" 00027 00028 namespace ns3 { 00029 00030 /** 00031 * \ingroup node 00032 * 00033 * \brief Header for the LLC/SNAP encapsulation 00034 */ 00035 class LlcSnapHeader : public Header 00036 { 00037 public: 00038 LlcSnapHeader (); 00039 00040 void SetType (uint16_t type); 00041 uint16_t GetType (void); 00042 00043 static TypeId GetTypeId (void); 00044 virtual TypeId GetInstanceTypeId (void) const; 00045 virtual void Print (std::ostream &os) const; 00046 virtual uint32_t GetSerializedSize (void) const; 00047 virtual void Serialize (Buffer::Iterator start) const; 00048 virtual uint32_t Deserialize (Buffer::Iterator start); 00049 private: 00050 uint16_t m_etherType; 00051 }; 00052 00053 } // namespace ns3 00054 00055 #endif /* LLC_SNAP_HEADER_H */