diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2002-07-22 09:46:48 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2002-07-22 09:46:48 +0000 |
commit | 2b3e9d9b244e279ef5693a7cf5dacc7903164af5 (patch) | |
tree | 955e5242d4d08a8ec747c8350f55003bb9d4b519 /c/src/exec/libnetworking/lib/getprotoby.c | |
parent | Remove everything. (diff) | |
download | rtems-2b3e9d9b244e279ef5693a7cf5dacc7903164af5.tar.bz2 |
Remove, moved to cpukit.
Diffstat (limited to 'c/src/exec/libnetworking/lib/getprotoby.c')
-rw-r--r-- | c/src/exec/libnetworking/lib/getprotoby.c | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/c/src/exec/libnetworking/lib/getprotoby.c b/c/src/exec/libnetworking/lib/getprotoby.c deleted file mode 100644 index cefa5c1ff2..0000000000 --- a/c/src/exec/libnetworking/lib/getprotoby.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - * $Id$ - */ - -#include <netdb.h> -#include <string.h> -#include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in.h> - -static const struct protoent prototab[] = { - { "ip", NULL, IPPROTO_IP }, - { "icmp", NULL, IPPROTO_ICMP }, - { "tcp", NULL, IPPROTO_TCP }, - { "udp", NULL, IPPROTO_UDP }, - }; - -/* - * Dummy version of BSD getprotobyname() - */ -struct protoent * -getprotobyname_static (const char *name) -{ - int i; - - for (i = 0 ; i < (sizeof prototab / sizeof prototab[0]) ; i++) { - if (strcmp (name, prototab[i].p_name) == 0) - return (struct protoent *) &prototab[i]; - } - return NULL; -} - -/* - * Dummy version of BSD getprotobynumber() - */ -struct protoent * -getprotobynumber_static (int proto) -{ - int i; - - for (i = 0 ; i < (sizeof prototab / sizeof prototab[0]) ; i++) { - if (proto == prototab[i].p_proto) - return (struct protoent *) &prototab[i]; - } - return NULL; -} |