src/node/udp.h
changeset 3125 d2d8a36cfd23
parent 3124 473e59b5e141
child 3126 68d35477a842
equal deleted inserted replaced
3124:473e59b5e141 3125:d2d8a36cfd23
     1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
       
     2 /*
       
     3  * Copyright (c) 2007 INRIA
       
     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: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
       
    19  */
       
    20 #ifndef UDP_H
       
    21 #define UDP_H
       
    22 
       
    23 #include "socket-factory.h"
       
    24 
       
    25 namespace ns3 {
       
    26 
       
    27 class Socket;
       
    28 
       
    29 /**
       
    30  * \brief API to create UDP socket instances 
       
    31  *
       
    32  * This abstract class defines the API for UDP sockets.
       
    33  * This class also can hold the global default variables used to
       
    34  * initialize newly created sockets, such as values that are
       
    35  * set through the sysctl or proc interfaces in Linux.
       
    36 
       
    37  * All UDP implementations must provide an implementation of CreateSocket
       
    38  * below.
       
    39  * 
       
    40  * \see UdpImpl
       
    41  */
       
    42 class Udp : public SocketFactory
       
    43 {
       
    44 public:
       
    45   static TypeId GetTypeId (void);
       
    46 
       
    47   /**
       
    48    * \return smart pointer to Socket
       
    49    * 
       
    50    * API for creating socket instances; must be implemented by UDP 
       
    51    * implementations..
       
    52    */
       
    53   virtual Ptr<Socket> CreateSocket (void) = 0;
       
    54 
       
    55 };
       
    56 
       
    57 } // namespace ns3
       
    58 
       
    59 #endif /* UDP_H */