ifconfig - routes
[tpg/acess2.git] / Usermode / Libraries / libnet.so_src / net.h
1 /*
2  * Acess2 Common Networking Library
3  * By John Hodge (thePowersGang)
4  */
5
6 #ifndef __LIBNET_H_
7 #define __LIBNET_H_
8
9 /**
10  * \brief Parse a string as an IP Address
11  * \param String        Input string
12  * \param Addr  Output binary format of the address
13  * \return Address family (0: Invalid, 4: IPv4, 6: IPv6)
14  */
15 extern int      Net_ParseAddress(const char *String, void *Addr);
16
17 /**
18  * \brief Convert a network address into a string
19  * \param AddressType   Address family as returned by Net_ParseAddress
20  * \param Address       Address data
21  */
22 extern const char *Net_PrintAddress(int AddressType, void *Address);
23
24 /**
25  * \brief Get the interface required to reach \a Addr
26  * \param AddrType      Addresss Family (4: IPv4, 6: IPv6)
27  * \param Addr  Address in binary format
28  * \return Interface number
29  */
30 extern char     *Net_GetInterface(int AddrType, void *Addr);
31
32 #endif

UCC git Repository :: git.ucc.asn.au