forked from Imagelibrary/rtems
Adjust to POSIX. Minor updates from FreeBSD.
This commit is contained in:
@@ -159,7 +159,7 @@ gethostbyname2(const char *name, int type)
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct hostent *
|
struct hostent *
|
||||||
gethostbyaddr(const char *addr, int len, int type)
|
gethostbyaddr(const void *addr, socklen_t len, int type)
|
||||||
{
|
{
|
||||||
struct hostent *hp = 0;
|
struct hostent *hp = 0;
|
||||||
int nserv = 0;
|
int nserv = 0;
|
||||||
|
|||||||
@@ -145,9 +145,7 @@ getnetbyname(const char *name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct netent *
|
struct netent *
|
||||||
getnetbyaddr(addr, af)
|
getnetbyaddr(uint32_t addr, int af)
|
||||||
u_long addr;
|
|
||||||
int af;
|
|
||||||
{
|
{
|
||||||
struct netent *hp = 0;
|
struct netent *hp = 0;
|
||||||
int nserv = 0;
|
int nserv = 0;
|
||||||
@@ -175,15 +173,14 @@ getnetbyaddr(addr, af)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
setnetent(stayopen)
|
setnetent(int stayopen)
|
||||||
int stayopen;
|
|
||||||
{
|
{
|
||||||
_setnethtent(stayopen);
|
_setnethtent(stayopen);
|
||||||
_setnetdnsent(stayopen);
|
_setnetdnsent(stayopen);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
endnetent()
|
endnetent(void)
|
||||||
{
|
{
|
||||||
_endnethtent();
|
_endnethtent();
|
||||||
_endnetdnsent();
|
_endnetdnsent();
|
||||||
|
|||||||
@@ -97,10 +97,6 @@ struct hostent {
|
|||||||
#define h_addr h_addr_list[0] /* address, for backward compatibility */
|
#define h_addr h_addr_list[0] /* address, for backward compatibility */
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
|
||||||
* Assumption here is that a network number
|
|
||||||
* fits in an unsigned long -- probably a poor one.
|
|
||||||
*/
|
|
||||||
struct netent {
|
struct netent {
|
||||||
char *n_name; /* official name of net */
|
char *n_name; /* official name of net */
|
||||||
char **n_aliases; /* alias list */
|
char **n_aliases; /* alias list */
|
||||||
@@ -123,7 +119,7 @@ struct protoent {
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Error return codes from gethostbyname() and gethostbyaddr()
|
* Error return codes from gethostbyname() and gethostbyaddr()
|
||||||
* (left in extern int h_errno).
|
* (left in h_errno).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define NETDB_INTERNAL -1 /* see errno */
|
#define NETDB_INTERNAL -1 /* see errno */
|
||||||
@@ -139,11 +135,11 @@ void endhostent(void);
|
|||||||
void endnetent(void);
|
void endnetent(void);
|
||||||
void endprotoent(void);
|
void endprotoent(void);
|
||||||
void endservent(void);
|
void endservent(void);
|
||||||
struct hostent *gethostbyaddr(const char *, int, int);
|
struct hostent *gethostbyaddr(const void *, socklen_t, int);
|
||||||
struct hostent *gethostbyname(const char *);
|
struct hostent *gethostbyname(const char *);
|
||||||
struct hostent *gethostbyname2(const char *, int);
|
struct hostent *gethostbyname2(const char *, int);
|
||||||
struct hostent *gethostent(void);
|
struct hostent *gethostent(void);
|
||||||
struct netent *getnetbyaddr(unsigned long, int);
|
struct netent *getnetbyaddr(uint32_t, int);
|
||||||
struct netent *getnetbyname(const char *);
|
struct netent *getnetbyname(const char *);
|
||||||
struct netent *getnetent(void);
|
struct netent *getnetent(void);
|
||||||
struct protoent *getprotobyname(const char *);
|
struct protoent *getprotobyname(const char *);
|
||||||
|
|||||||
Reference in New Issue
Block a user