Search:

SENF Extensible Network Framework

  • Home
  • Download
  • Wiki
  • BerliOS
  • ChangeLog
  • Browse SVN
  • Bug Tracker
  • Overview
  • Examples
  • HowTos
  • Glossary
  • PPI
  • Packets
  • Scheduler
  • Socket
  • Utils
  • Console
  • Daemon
  • Logger
  • Termlib
  • Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

DefaultBundle/NDPOptions.cc

Go to the documentation of this file.
00001 // $Id: NDPOptions.cc 1742 2010-11-04 14:51:56Z g0dil $
00002 //
00003 // Copyright (C) 2010
00004 // Fraunhofer (FOKUS)
00005 // Competence Center NETwork research (NET), St. Augustin, GERMANY
00006 //     Stefan Sauer <ssauer@berlios.de>
00007 //
00008 // This program is free software; you can redistribute it and/or modify
00009 // it under the terms of the GNU General Public License as published by
00010 // the Free Software Foundation; either version 2 of the License, or
00011 // (at your option) any later version.
00012 //
00013 // This program is distributed in the hope that it will be useful,
00014 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016 // GNU General Public License for more details.
00017 //
00018 // You should have received a copy of the GNU General Public License
00019 // along with this program; if not, write to the
00020 // Free Software Foundation, Inc.,
00021 // 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00022 
00023 // Definition of non-inline non-template functions
00024 
00025 // Custom includes
00026 #include "NDPOptions.hh"
00027 
00028 #define prefix_
00029 //-/////////////////////////////////////////////////////////////////////////////////////////////////
00030 SENF_PACKET_TLV_REGISTRY_REGISTER( senf::NDPSourceLLAddressTLVParser );
00031 SENF_PACKET_TLV_REGISTRY_REGISTER( senf::NDPTargetLLAddressTLVParser );
00032 SENF_PACKET_TLV_REGISTRY_REGISTER( senf::NDPPrefixInformationTLVParser );
00033 SENF_PACKET_TLV_REGISTRY_REGISTER( senf::NDPMTUTLVParser );
00034 
00035 prefix_ void senf::NDPSourceLLAddressTLVParser::dump(std::ostream & os) const
00036 {
00037     os << "Source Link-layer Address Option:" << "\n";
00038     os << senf::fieldName("Link-layer Address") << source() << "\n";
00039 }
00040 
00041 prefix_ void senf::NDPTargetLLAddressTLVParser::dump(std::ostream & os) const
00042 {
00043     os << "Target Link-layer Address Option:" << "\n";
00044     os << senf::fieldName("Link-layer Address") << target() << "\n";
00045 }
00046 
00047 prefix_ void senf::NDPPrefixInformationTLVParser::dump(std::ostream & os) const
00048 {
00049     os << "Prefix Information Option:" << "\n";
00050     os << senf::fieldName("Prefix Length")                         << unsigned(prefixLength()) << "\n";
00051     os << senf::fieldName("On-link Flag")                          << unsigned(l()) << "\n";
00052     os << senf::fieldName("Autonomous Address-configuration Flag") << unsigned(a()) << "\n";
00053     os << senf::fieldName("Reserved(6Bit)")                        << unsigned(reserved1()) << "\n";
00054     os << senf::fieldName("Valid Lifetime")                        << unsigned(validLifetime()) << "\n";
00055     os << senf::fieldName("Preferred Lifetime")                    << unsigned(preferredLifetime()) << "\n";
00056     os << senf::fieldName("Reserved(32Bit)")                       << unsigned(reserved2()) << "\n";
00057     os << senf::fieldName("Prefix")                                << prefix() << "\n";
00058 
00059 }
00060 
00061 prefix_ void senf::NDPMTUTLVParser::dump(std::ostream & os) const
00062 {
00063     os << "MTU Information Option:" << "\n";
00064     os << senf::fieldName("MTU") << unsigned(mtu()) << "\n";
00065 }
00066 
00067 
00068 //-/////////////////////////////////////////////////////////////////////////////////////////////////
00069 #undef prefix_

Contact: senf-dev@lists.berlios.de | © 2006-2010 Fraunhofer Institute for Open Communication Systems, Network Research