forked from Imagelibrary/rtems
libnetworking: Add <rtems/rtems_netdb.h>
Move prototypes of non-portable _get*by*name/addr and _set/end*ent functions. This makes it easier to update <netdb.h>.
This commit is contained in:
committed by
Sebastian Huber
parent
187a074404
commit
7e6f2350ea
@@ -149,6 +149,7 @@ include_rtems_HEADERS += rtems/tftp.h
|
||||
include_rtems_HEADERS += rtems/ftpfs.h
|
||||
include_rtems_HEADERS += rtems/mkrootfs.h
|
||||
include_rtems_HEADERS += rtems/rtems_mii_ioctl.h
|
||||
include_rtems_HEADERS += rtems/rtems_netdb.h
|
||||
|
||||
libnetworking_a_SOURCES += rtems/sghostname.c \
|
||||
rtems/rtems_glue.c rtems/rtems_malloc_mbuf.c rtems/rtems_syscall.c \
|
||||
|
||||
@@ -73,6 +73,7 @@
|
||||
#include <strings.h>
|
||||
#endif
|
||||
#include <netdb.h>
|
||||
#include <rtems/rtems_netdb.h>
|
||||
#include <resolv.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
#include <rtems/rtems_netdb.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h> /* realloc, malloc, free */
|
||||
#include <ctype.h>
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
#include <rtems/rtems_netdb.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
#include <rtems/rtems_netdb.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
|
||||
@@ -70,6 +70,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <netdb.h>
|
||||
#include <rtems/rtems_netdb.h>
|
||||
#include <resolv.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
#include <arpa/inet.h>
|
||||
#include <arpa/nameser.h>
|
||||
#include <netdb.h>
|
||||
#include <rtems/rtems_netdb.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#ifdef HAVE_STRINGS_H
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
#include <rtems/rtems_netdb.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
#include <rtems/rtems_netdb.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <netdb.h>
|
||||
#include <rtems/rtems_netdb.h>
|
||||
#include <resolv.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
|
||||
@@ -168,28 +168,6 @@ int gethostbyname_r(const char* name,
|
||||
*/
|
||||
|
||||
/* DO NOT USE THESE, THEY ARE SUBJECT TO CHANGE AND ARE NOT PORTABLE!!! */
|
||||
void _sethosthtent(int);
|
||||
void _endhosthtent(void);
|
||||
void _sethostdnsent(int);
|
||||
void _endhostdnsent(void);
|
||||
void _setnethtent(int);
|
||||
void _endnethtent(void);
|
||||
void _setnetdnsent(int);
|
||||
void _endnetdnsent(void);
|
||||
struct hostent * _gethostbyhtname(const char *, int);
|
||||
struct hostent * _gethostbydnsname(const char *, int);
|
||||
struct hostent * _gethostbynisname(const char *, int);
|
||||
struct hostent * _gethostbyhtaddr (const char *, int, int);
|
||||
struct hostent * _gethostbydnsaddr(const char *, int, int);
|
||||
struct hostent * _gethostbynisaddr(const char *, int, int);
|
||||
struct netent * _getnetbyhtname (const char *);
|
||||
struct netent * _getnetbydnsname(const char *);
|
||||
struct netent * _getnetbynisname(const char *);
|
||||
struct netent * _getnetbyhtaddr (unsigned long, int);
|
||||
struct netent * _getnetbydnsaddr(unsigned long, int);
|
||||
struct netent * _getnetbynisaddr(unsigned long, int);
|
||||
void _map_v4v6_address(const char *, char *);
|
||||
void _map_v4v6_hostent(struct hostent *, char **, int *len);
|
||||
__END_DECLS
|
||||
|
||||
#endif /* !_NETDB_H_ */
|
||||
|
||||
@@ -310,6 +310,10 @@ $(PROJECT_INCLUDE)/rtems/rtems_mii_ioctl.h: rtems/rtems_mii_ioctl.h $(PROJECT_IN
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems_mii_ioctl.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems_mii_ioctl.h
|
||||
|
||||
$(PROJECT_INCLUDE)/rtems/rtems_netdb.h: rtems/rtems_netdb.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems_netdb.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems_netdb.h
|
||||
|
||||
$(PROJECT_INCLUDE)/sys/$(dirstamp):
|
||||
@$(MKDIR_P) $(PROJECT_INCLUDE)/sys
|
||||
@: > $(PROJECT_INCLUDE)/sys/$(dirstamp)
|
||||
|
||||
52
cpukit/libnetworking/rtems/rtems_netdb.h
Normal file
52
cpukit/libnetworking/rtems/rtems_netdb.h
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Copyright (c) 2016 embedded brains GmbH. All rights reserved.
|
||||
*
|
||||
* embedded brains GmbH
|
||||
* Dornierstr. 4
|
||||
* 82178 Puchheim
|
||||
* Germany
|
||||
* <rtems@embedded-brains.de>
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.org/license/LICENSE.
|
||||
*/
|
||||
|
||||
#ifndef _RTEMS_RTEMS_NETDB_H
|
||||
#define _RTEMS_RTEMS_NETDB_H
|
||||
|
||||
#include <netdb.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/* DO NOT USE THESE, THEY ARE SUBJECT TO CHANGE AND ARE NOT PORTABLE!!! */
|
||||
void _sethosthtent(int);
|
||||
void _endhosthtent(void);
|
||||
void _sethostdnsent(int);
|
||||
void _endhostdnsent(void);
|
||||
void _setnethtent(int);
|
||||
void _endnethtent(void);
|
||||
void _setnetdnsent(int);
|
||||
void _endnetdnsent(void);
|
||||
struct hostent * _gethostbyhtname(const char *, int);
|
||||
struct hostent * _gethostbydnsname(const char *, int);
|
||||
struct hostent * _gethostbynisname(const char *, int);
|
||||
struct hostent * _gethostbyhtaddr (const char *, int, int);
|
||||
struct hostent * _gethostbydnsaddr(const char *, int, int);
|
||||
struct hostent * _gethostbynisaddr(const char *, int, int);
|
||||
struct netent * _getnetbyhtname (const char *);
|
||||
struct netent * _getnetbydnsname(const char *);
|
||||
struct netent * _getnetbynisname(const char *);
|
||||
struct netent * _getnetbyhtaddr (unsigned long, int);
|
||||
struct netent * _getnetbydnsaddr(unsigned long, int);
|
||||
struct netent * _getnetbynisaddr(unsigned long, int);
|
||||
void _map_v4v6_address(const char *, char *);
|
||||
void _map_v4v6_hostent(struct hostent *, char **, int *len);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _RTEMS_RTEMS_NETDB_H */
|
||||
Reference in New Issue
Block a user