netlink/netlink-socket-factory.h
author Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
Thu, 05 May 2011 09:28:21 +0200
changeset 66 2fe1f3e576c9
parent 63 model/netlink-socket-factory.h@e89dca438df6
permissions -rw-r--r--
make it somewhat build sanely
     1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
     2 /*
     3  * Copyright (c) 2008 Liu Jian
     4  *
     5  * This program is free software; you can redistribute it and/or modify
     6  * it under the terms of the GNU General Public License version 2 as
     7  * published by the Free Software Foundation;
     8  *
     9  * This program is distributed in the hope that it will be useful,
    10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    12  * GNU General Public License for more details.
    13  *
    14  * You should have received a copy of the GNU General Public License
    15  * along with this program; if not, write to the Free Software
    16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    17  *
    18  * Author: Liu Jian <liujatp@gmail.com>
    19  *         Hajime Tazaki <tazaki@sfc.wide.ad.jp>
    20  */
    21 
    22 #ifndef NETLINK_SOCKET_FACTORY_H
    23 #define NETLINK_SOCKET_FACTORY_H
    24 
    25 #include "ns3/socket-factory.h"
    26 
    27 namespace ns3 {
    28 
    29 class Socket;
    30 
    31 /**
    32  * This can be used as an interface in a node in order for the node to
    33  * generate NetlinkSockets.
    34  */
    35 class NetlinkSocketFactory : public SocketFactory
    36 {
    37 public:
    38   static TypeId GetTypeId (void);
    39 
    40   NetlinkSocketFactory ();
    41 
    42   /**
    43    * Creates a NetlinkSocket and returns a pointer to it.
    44    *
    45    * \return a pointer to the created socket
    46    */
    47   virtual Ptr<Socket> CreateSocket (void);
    48 };
    49 
    50 } // namespace ns3
    51 
    52 #endif /* NETLINK_SOCKET_FACTORY_H */