|
a/libupnpp/getsyshwaddr.h |
|
b/libupnpp/getsyshwaddr.h |
|
... |
|
... |
28 |
*/
|
28 |
*/
|
29 |
#ifndef __GETIFADDR_H__
|
29 |
#ifndef __GETIFADDR_H__
|
30 |
#define __GETIFADDR_H__
|
30 |
#define __GETIFADDR_H__
|
31 |
#include <arpa/inet.h>
|
31 |
#include <arpa/inet.h>
|
32 |
|
32 |
|
33 |
#define MACADDR_IS_ZERO(x) \
|
33 |
/**
|
34 |
((x[0] == 0x00) && \
|
34 |
* Retrieve hardware (ethernet) network address for this host.
|
35 |
(x[1] == 0x00) && \
|
35 |
* @param iface if not null or empty, use this interface, else first found.
|
36 |
(x[2] == 0x00) && \
|
36 |
* @param[output] ip return IP address.
|
37 |
(x[3] == 0x00) && \
|
37 |
* @param ilen size in bytes of the ip buffer.
|
38 |
(x[4] == 0x00) && \
|
38 |
* @param[output] buf return hardware address.
|
39 |
(x[5] == 0x00))
|
39 |
* @param hlen size in bytes of the buf buffer.
|
40 |
|
40 |
*/
|
41 |
int
|
41 |
int getsyshwaddr(const char *iface, char *ip, int ilen, char *buf, int hlen);
|
42 |
getsyshwaddr(char * buf, int len);
|
|
|
43 |
|
42 |
|
44 |
#endif
|
43 |
#endif
|
45 |
|
44 |
|