summaryrefslogtreecommitdiff
path: root/libopie2/opienet/onetwork.h
Unidiff
Diffstat (limited to 'libopie2/opienet/onetwork.h') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opienet/onetwork.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/libopie2/opienet/onetwork.h b/libopie2/opienet/onetwork.h
index fa9f39f..f0c4450 100644
--- a/libopie2/opienet/onetwork.h
+++ b/libopie2/opienet/onetwork.h
@@ -193,44 +193,51 @@ class ONetworkInterface : public QObject
193 bool isWireless() const; 193 bool isWireless() const;
194 /** 194 /**
195 * Associate the IP address @ addr with the interface. 195 * Associate the IP address @ addr with the interface.
196 */ 196 */
197 void setIPV4Address( const QHostAddress& addr ); 197 void setIPV4Address( const QHostAddress& addr );
198 /** 198 /**
199 * @returns the IPv4 address associated with the interface. 199 * @returns the IPv4 address associated with the interface.
200 */ 200 */
201 QString ipV4Address() const; //TODO: make this return an OHostAddress 201 QString ipV4Address() const; //TODO: make this return an OHostAddress
202 /** 202 /**
203 * Associate the MAC address @a addr with the interface. 203 * Associate the MAC address @a addr with the interface.
204 * @note It can be necessary to shut down the interface prior to calling this method. 204 * @note It can be necessary to shut down the interface prior to calling this method.
205 * @note This operation needs root privileges
205 * @warning This is not supported by all drivers. 206 * @warning This is not supported by all drivers.
206 */ 207 */
207 void setMacAddress( const OMacAddress& addr ); 208 void setMacAddress( const OMacAddress& addr );
208 /** 209 /**
209 * @returns the MAC address associated with the interface. 210 * @returns the MAC address associated with the interface.
210 */ 211 */
211 OMacAddress macAddress() const; 212 OMacAddress macAddress() const;
212 /** 213 /**
213 * Associate the IPv4 @a netmask with the interface. 214 * Associate the IPv4 @a netmask with the interface.
214 */ 215 */
215 void setIPV4Netmask( const QHostAddress& netmask ); 216 void setIPV4Netmask( const QHostAddress& netmask );
216 /** 217 /**
217 * @returns the IPv4 netmask associated with the interface. 218 * @returns the IPv4 netmask associated with the interface.
218 */ 219 */
219 QString ipV4Netmask() const; //TODO: make this return an OHostAddress 220 QString ipV4Netmask() const; //TODO: make this return an OHostAddress
220 /** 221 /**
221 * @returns the data link type currently associated with the interface. 222 * @returns the data link type currently associated with the interface.
222 * @see #include <net/if_arp.h> for possible values. 223 * @see #include <net/if_arp.h> for possible values.
223 */ 224 */
224 int dataLinkType() const; 225 int dataLinkType() const;
226 /**
227 * @returns a ONetworkInterfaceDriverInfo driver information block
228 * @note This operation needs root privileges
229 * @warning This is not supported by all drivers
230 */
231 ONetworkInterfaceDriverInfo driverInfo() const;
225 232
226 protected: 233 protected:
227 const int _sfd; 234 const int _sfd;
228 mutable ifreq _ifr; 235 mutable ifreq _ifr;
229 OMonitoringInterface* _mon; 236 OMonitoringInterface* _mon;
230 237
231 protected: 238 protected:
232 struct ifreq& ifr() const; 239 struct ifreq& ifr() const;
233 virtual void init(); 240 virtual void init();
234 bool ioctl( int call ) const; 241 bool ioctl( int call ) const;
235 bool ioctl( int call, struct ifreq& ) const; 242 bool ioctl( int call, struct ifreq& ) const;
236 private: 243 private: