summaryrefslogtreecommitdiff
path: root/libopie2/opienet/onetwork.h
Unidiff
Diffstat (limited to 'libopie2/opienet/onetwork.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opienet/onetwork.h49
1 files changed, 35 insertions, 14 deletions
diff --git a/libopie2/opienet/onetwork.h b/libopie2/opienet/onetwork.h
index db8e702..2348bbc 100644
--- a/libopie2/opienet/onetwork.h
+++ b/libopie2/opienet/onetwork.h
@@ -58,4 +58,4 @@
58// ML: which conflicts with the user header <net/if.h> 58// ML: which conflicts with the user header <net/if.h>
59// ML: We really a user header for the Wireless Extensions, something like <net/wireless.h> 59// ML: We really need a user header for the Wireless Extensions, something like <net/wireless.h>
60// ML: I will drop Jean an mail on that subject 60// ML: I will drop Jean a mail on that subject
61 61
@@ -75,5 +75,5 @@ class OMonitoringInterface;
75/** 75/**
76 * @brief A container class for all network devices. 76 * @brief A container class for all network interfaces
77 * 77 *
78 * This class provides access to all available network devices of your computer. 78 * This class provides access to all available network interfaces of your computer.
79 * @author Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> 79 * @author Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de>
@@ -90,2 +90,6 @@ class ONetwork : public QObject
90 /** 90 /**
91 * @returns the number of available interfaces
92 */
93 int count() const;
94 /**
91 * @returns a pointer to the (one and only) @ref ONetwork instance. 95 * @returns a pointer to the (one and only) @ref ONetwork instance.
@@ -108,2 +112,8 @@ class ONetwork : public QObject
108 ONetworkInterface* interface( const QString& interface ) const; 112 ONetworkInterface* interface( const QString& interface ) const;
113 /**
114 * @internal Rebuild the internal interface database
115 * @note Sometimes it might be useful to call this from client code,
116 * e.g. after cardctl insert
117 */
118 void synchronize();
109 119
@@ -111,3 +121,2 @@ class ONetwork : public QObject
111 ONetwork(); 121 ONetwork();
112 void synchronize();
113 122
@@ -176,3 +185,3 @@ class ONetworkInterface : public QObject
176 bool isUp() const; 185 bool isUp() const;
177 /* 186 /**
178 * @returns true if the interface is a loopback interface. 187 * @returns true if the interface is a loopback interface.
@@ -180,3 +189,3 @@ class ONetworkInterface : public QObject
180 bool isLoopback() const; 189 bool isLoopback() const;
181 /* 190 /**
182 * @returns true if the interface is featuring supports the wireless extension protocol. 191 * @returns true if the interface is featuring supports the wireless extension protocol.
@@ -184,7 +193,11 @@ class ONetworkInterface : public QObject
184 bool isWireless() const; 193 bool isWireless() const;
185 /* 194 /**
186 * @returns the IPv4 address associated with this interface. 195 * Associate the IP address @ addr with the interface.
196 */
197 void setIPV4Address( const QHostAddress& addr );
198 /**
199 * @returns the IPv4 address associated with the interface.
187 */ 200 */
188 QString ipV4Address() const; 201 QString ipV4Address() const;
189 /* 202 /**
190 * Associate the MAC address @a addr with the interface. 203 * Associate the MAC address @a addr with the interface.
@@ -194,8 +207,16 @@ class ONetworkInterface : public QObject
194 void setMacAddress( const OMacAddress& addr ); 207 void setMacAddress( const OMacAddress& addr );
195 /* 208 /**
196 * @returns the MAC address associated with this interface. 209 * @returns the MAC address associated with the interface.
197 */ 210 */
198 OMacAddress macAddress() const; 211 OMacAddress macAddress() const;
199 /* 212 /**
200 * @returns the data link type currently associated with this interface. 213 * Associate the IPv4 @a netmask with the interface.
214 */
215 void setIPV4Netmask( const QHostAddress& netmask );
216 /**
217 * @returns the IPv4 netmask associated with the interface.
218 */
219 QString ipV4Netmask() const;
220 /**
221 * @returns the data link type currently associated with the interface.
201 * @see #include <net/if_arp.h> for possible values. 222 * @see #include <net/if_arp.h> for possible values.