Fixed crt0.o not creating its output directory
[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 size in bytes of an address type
26  * \param AddressType   Address type returned by Net_ParseAddress
27  * \return Size of an address in bytes
28  */
29 extern int Net_GetAddressSize(int AddressType);
30
31 /**
32  * \brief Get the interface required to reach \a Addr
33  * \param AddrType      Addresss Family (4: IPv4, 6: IPv6)
34  * \param Addr  Address in binary format
35  * \return Interface number
36  */
37 extern char     *Net_GetInterface(int AddrType, void *Addr);
38
39 #endif

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