summaryrefslogtreecommitdiffstats
path: root/cpukit/libnetworking
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2007-10-15 07:59:00 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2007-10-15 07:59:00 +0000
commit807337d281ffd5125123c97267329cfc501bf9db (patch)
tree82cd7d90ed2a8ac58ea66f0b45fb52885c7ae713 /cpukit/libnetworking
parentRemove (diff)
downloadrtems-807337d281ffd5125123c97267329cfc501bf9db.tar.bz2
Adjust to POSIX. Minor updates from FreeBSD.
Diffstat (limited to 'cpukit/libnetworking')
-rw-r--r--cpukit/libnetworking/libc/gethostnamadr.c2
-rw-r--r--cpukit/libnetworking/libc/getnetnamadr.c9
-rw-r--r--cpukit/libnetworking/netdb.h10
3 files changed, 7 insertions, 14 deletions
diff --git a/cpukit/libnetworking/libc/gethostnamadr.c b/cpukit/libnetworking/libc/gethostnamadr.c
index ab48634ae8..19c05b31ba 100644
--- a/cpukit/libnetworking/libc/gethostnamadr.c
+++ b/cpukit/libnetworking/libc/gethostnamadr.c
@@ -159,7 +159,7 @@ gethostbyname2(const char *name, int type)
}
struct hostent *
-gethostbyaddr(const char *addr, int len, int type)
+gethostbyaddr(const void *addr, socklen_t len, int type)
{
struct hostent *hp = 0;
int nserv = 0;
diff --git a/cpukit/libnetworking/libc/getnetnamadr.c b/cpukit/libnetworking/libc/getnetnamadr.c
index 3676697f91..e99bce565e 100644
--- a/cpukit/libnetworking/libc/getnetnamadr.c
+++ b/cpukit/libnetworking/libc/getnetnamadr.c
@@ -145,9 +145,7 @@ getnetbyname(const char *name)
}
struct netent *
-getnetbyaddr(addr, af)
- u_long addr;
- int af;
+getnetbyaddr(uint32_t addr, int af)
{
struct netent *hp = 0;
int nserv = 0;
@@ -175,15 +173,14 @@ getnetbyaddr(addr, af)
}
void
-setnetent(stayopen)
- int stayopen;
+setnetent(int stayopen)
{
_setnethtent(stayopen);
_setnetdnsent(stayopen);
}
void
-endnetent()
+endnetent(void)
{
_endnethtent();
_endnetdnsent();
diff --git a/cpukit/libnetworking/netdb.h b/cpukit/libnetworking/netdb.h
index 5c206f12e2..8d4c60c5b5 100644
--- a/cpukit/libnetworking/netdb.h
+++ b/cpukit/libnetworking/netdb.h
@@ -97,10 +97,6 @@ struct hostent {
#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 {
char *n_name; /* official name of net */
char **n_aliases; /* alias list */
@@ -123,7 +119,7 @@ struct protoent {
/*
* Error return codes from gethostbyname() and gethostbyaddr()
- * (left in extern int h_errno).
+ * (left in h_errno).
*/
#define NETDB_INTERNAL -1 /* see errno */
@@ -139,11 +135,11 @@ void endhostent(void);
void endnetent(void);
void endprotoent(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 *gethostbyname2(const char *, int);
struct hostent *gethostent(void);
-struct netent *getnetbyaddr(unsigned long, int);
+struct netent *getnetbyaddr(uint32_t, int);
struct netent *getnetbyname(const char *);
struct netent *getnetent(void);
struct protoent *getprotobyname(const char *);