nidas v1.2.3
Inet4PacketInfo.h
Go to the documentation of this file.
1// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 4; tab-width: 4; -*-
2// vim: set shiftwidth=4 softtabstop=4 expandtab:
3/*
4 ********************************************************************
5 ** NIDAS: NCAR In-situ Data Acquistion Software
6 **
7 ** 2009, Copyright University Corporation for Atmospheric Research
8 **
9 ** This program is free software; you can redistribute it and/or modify
10 ** it under the terms of the GNU General Public License as published by
11 ** the Free Software Foundation; either version 2 of the License, or
12 ** (at your option) any later version.
13 **
14 ** This program is distributed in the hope that it will be useful,
15 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ** GNU General Public License for more details.
18 **
19 ** The LICENSE.txt file accompanying this software contains
20 ** a copy of the GNU General Public License. If it is not found,
21 ** write to the Free Software Foundation, Inc.,
22 ** 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 **
24 ********************************************************************
25*/
26
27#ifndef NIDAS_UTIL_INET4PACKETINFO_H
28#define NIDAS_UTIL_INET4PACKETINFO_H
29
31#include "Inet4SocketAddress.h"
32
33namespace nidas { namespace util {
34
40{
41public:
44 {
45 }
46
47 virtual ~Inet4PacketInfo() {}
48
54 virtual Inet4Address getLocalAddress() const { return _localaddr; }
55
56 virtual void setLocalAddress(const Inet4Address& val) { _localaddr = val; }
57
63 virtual const Inet4Address& getDestinationAddress() const { return _destaddr; }
64
65 virtual void setDestinationAddress(const Inet4Address& val) { _destaddr = val; }
66
70 virtual const Inet4NetworkInterface& getInterface() const { return _iface; }
71
72 virtual void setInterface(const Inet4NetworkInterface& val ) { _iface = val; }
73
78 virtual int getFlags() const { return _flags; }
79
80 virtual void setFlags(int val) { _flags = val; }
81
82private:
84
86
88
89 int _flags;
90};
91
109
110}} // namespace nidas namespace util
111
112#endif
Support for IP version 4 host address.
Definition Inet4Address.h:46
Definition Inet4NetworkInterface.h:36
Definition Inet4PacketInfo.h:93
void setRemoteSocketAddress(const Inet4SocketAddress &val)
Definition Inet4PacketInfo.h:104
Inet4PacketInfoX()
Definition Inet4PacketInfo.h:95
Inet4SocketAddress getRemoteSocketAddress() const
The remote address of the packet.
Definition Inet4PacketInfo.h:102
Inet4SocketAddress _remotesaddr
Definition Inet4PacketInfo.h:107
Ancillary information that can be determined about an incoming UDP packet.
Definition Inet4PacketInfo.h:40
virtual void setLocalAddress(const Inet4Address &val)
Definition Inet4PacketInfo.h:56
Inet4Address _destaddr
Definition Inet4PacketInfo.h:85
virtual void setFlags(int val)
Definition Inet4PacketInfo.h:80
virtual void setDestinationAddress(const Inet4Address &val)
Definition Inet4PacketInfo.h:65
Inet4NetworkInterface _iface
Definition Inet4PacketInfo.h:87
Inet4Address _localaddr
Definition Inet4PacketInfo.h:83
virtual ~Inet4PacketInfo()
Definition Inet4PacketInfo.h:47
virtual const Inet4Address & getDestinationAddress() const
The destination address of the packet.
Definition Inet4PacketInfo.h:63
virtual void setInterface(const Inet4NetworkInterface &val)
Definition Inet4PacketInfo.h:72
Inet4PacketInfo()
Definition Inet4PacketInfo.h:42
virtual int getFlags() const
The flags on the received packet.
Definition Inet4PacketInfo.h:78
virtual const Inet4NetworkInterface & getInterface() const
The interface that the packet was received on.
Definition Inet4PacketInfo.h:70
int _flags
Definition Inet4PacketInfo.h:89
virtual Inet4Address getLocalAddress() const
The local address of the packet.
Definition Inet4PacketInfo.h:54
A IP version 4 socket address, containing a host address, and a port number.
Definition Inet4SocketAddress.h:41
Root namespace for the NCAR In-Situ Data Acquisition Software.
Definition A2DConverter.h:31