Rudiments
networkinterfaces.h
1 // Copyright (c) 2005 David Muse
2 // See the COPYING file for more information.
3 
4 #ifndef RUDIMENTS_NETWORKINTERFACES_H
5 #define RUDIMENTS_NETWORKINTERFACES_H
6 
7 #include <rudiments/private/networkinterfacesincludes.h>
8 
9 #ifdef RUDIMENTS_NAMESPACE
10 namespace rudiments {
11 #endif
12 
13 // @cond
14 
15 typedef listnode< networkinterface * > networkinterfacelistnode;
16 typedef list< networkinterface *, networkinterfacelistnode >
17  networkinterfacelist;
18 
19 class networkinterfaceprivate;
20 
21 // FIXME: implement this class
22 class RUDIMENTS_DLLSPEC networkinterface {
23  public:
24  networkinterface();
25  ~networkinterface();
26 
27  sockaddr getAddress();
28  sockaddr getDestinationAddress();
29  sockaddr getBroadcastAddress();
30  sockaddr getNetmask();
31  sockaddr getHardwareAddress();
32 
33  int16_t getFlags();
34  int32_t getMetric();
35  int32_t getMaximumTransmitUnit();
36  ifmap getDeviceMap();
37  int32_t getSlaveDevice();
38  int32_t getForUseByInterfaceData();
39  int32_t getIndex();
40  int32_t getLinkBandwidth();
41  int32_t getQueueLength();
42  const char *getNewName();
43 
44  #include <rudiments/private/networkinterface.h>
45 };
46 
47 class RUDIMENTS_DLLSPEC networkinterfaces {
48  public:
49  static networkinterfacelist *getList();
50  static networkinterface *getInterface(const char *name);
51  #include <rudiments/private/networkinterfaces.h>
52 }
53 
54 // @endcond
55 
56 #ifdef RUDIMENTS_NAMESPACE
57 }
58 #endif
59 
60 #endif