Donatien Garnier / LwIPNetworking

Dependencies:   DebugLib Socket lwip lwip-sys

Dependents:   EthernetInterface

Fork of NetworkingCoreLib by Donatien Garnier

Committer:
donatien
Date:
Fri Jun 22 16:18:09 2012 +0000
Revision:
15:cf5f669a30bc
Parent:
13:f7d8c8088289
DebugLib up

Who changed what in which revision?

UserRevisionLine numberNew contents of line
donatien 8:387f573a6813 1 /* netdb.h */
donatien 13:f7d8c8088289 2 /* Copyright (C) 2012 mbed.org, MIT License
donatien 13:f7d8c8088289 3 *
donatien 13:f7d8c8088289 4 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
donatien 13:f7d8c8088289 5 * and associated documentation files (the "Software"), to deal in the Software without restriction,
donatien 13:f7d8c8088289 6 * including without limitation the rights to use, copy, modify, merge, publish, distribute,
donatien 13:f7d8c8088289 7 * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
donatien 13:f7d8c8088289 8 * furnished to do so, subject to the following conditions:
donatien 13:f7d8c8088289 9 *
donatien 13:f7d8c8088289 10 * The above copyright notice and this permission notice shall be included in all copies or
donatien 13:f7d8c8088289 11 * substantial portions of the Software.
donatien 13:f7d8c8088289 12 *
donatien 13:f7d8c8088289 13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
donatien 13:f7d8c8088289 14 * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
donatien 13:f7d8c8088289 15 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
donatien 13:f7d8c8088289 16 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
donatien 13:f7d8c8088289 17 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
donatien 13:f7d8c8088289 18 */
donatien 8:387f573a6813 19
donatien 8:387f573a6813 20 #ifndef NETDB_H_
donatien 8:387f573a6813 21 #define NETDB_H_
donatien 8:387f573a6813 22
donatien 8:387f573a6813 23 #include "lwip/netdb.h"
donatien 8:387f573a6813 24
donatien 8:387f573a6813 25 //DNS
donatien 8:387f573a6813 26
donatien 8:387f573a6813 27 inline struct hostent *gethostbyname(const char *name)
donatien 8:387f573a6813 28 {
donatien 8:387f573a6813 29 return lwip_gethostbyname(name);
donatien 8:387f573a6813 30 }
donatien 8:387f573a6813 31
donatien 8:387f573a6813 32 inline int gethostbyname_r(const char *name, struct hostent *ret, char *buf, size_t buflen, struct hostent **result, int *h_errnop)
donatien 8:387f573a6813 33 {
donatien 8:387f573a6813 34 return lwip_gethostbyname_r(name, ret, buf, buflen, result, h_errnop);
donatien 8:387f573a6813 35 }
donatien 8:387f573a6813 36
donatien 8:387f573a6813 37 inline void freeaddrinfo(struct addrinfo *ai)
donatien 8:387f573a6813 38 {
donatien 8:387f573a6813 39 return lwip_freeaddrinfo(ai);
donatien 8:387f573a6813 40 }
donatien 8:387f573a6813 41
donatien 8:387f573a6813 42 inline int getaddrinfo(const char *nodename, const char *servname, const struct addrinfo *hints, struct addrinfo **res)
donatien 8:387f573a6813 43 {
donatien 8:387f573a6813 44 return lwip_getaddrinfo(nodename, servname, hints, res);
donatien 8:387f573a6813 45 }
donatien 8:387f573a6813 46
donatien 8:387f573a6813 47 #endif /* NETDB_H_ */