1/* MiniUPnP project
2 * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
3 * (c) 2006 Thomas Bernard
4 * This software is subject to the conditions detailed
5 * in the LICENCE file provided within the distribution */
6
7#ifndef __GETIFADDR_H__
8#define __GETIFADDR_H__
9#include <arpa/inet.h>
10
11#define MACADDR_IS_ZERO(x) \
12  ((x[0] == 0x00) && \
13   (x[1] == 0x00) && \
14   (x[2] == 0x00) && \
15   (x[3] == 0x00) && \
16   (x[4] == 0x00) && \
17   (x[5] == 0x00))
18
19/* getifaddr()
20 * take a network interface name and write the
21 * ip v4 address as text in the buffer
22 * returns: 0 success, -1 failure */
23int
24getifaddr(const char * ifname, char * buf, int len);
25
26int
27getsysaddr(char * buf, int len);
28
29int
30getsyshwaddr(char * buf, int len);
31
32int
33get_remote_mac(struct in_addr ip_addr, unsigned char * mac);
34
35#endif
36
37