conform data for arpa/inet.h
Andreas Jaeger
aj@suse.de
Sat Apr 29 10:16:00 GMT 2000
Hi Uli,
I'm appending the conform test data for <arpa/inet.h>. Since this is
the first time I've created such a file, I'd ask you to review it very
carefully (it's completly untested).
<arpa/inet.h> is part of the current Austin-Draft. What kind of test
macro should be used to mark this?
Andreas
2000-04-29 Andreas Jaeger <aj@suse.de>
* conform/data/arpa/inet.h-data: New file.
* conform/conformtest.pl: Add arpa/inet.h as header.
============================================================
Index: conform/conformtest.pl
--- conform/conformtest.pl 2000/02/27 23:22:23 1.10
+++ conform/conformtest.pl 2000/04/29 17:04:00
@@ -17,7 +17,7 @@
"math.h", "locale.h", "libgen.h", "langinfo.h", "iso646.h",
"inttypes.h", "iconv.h", "grp.h", "glob.h", "ftw.h", "fnmatch.h",
"fmtmsg.h", "float.h", "fcntl.h", "errno.h", "dlfcn.h", "dirent.h",
- "ctype.h", "cpio.h", "assert.h", "aio.h");
+ "ctype.h", "cpio.h", "assert.h", "arpa/inet.h", "aio.h");
# These are the ISO C99 keywords.
@keywords = ('auto', 'break', 'case', 'char', 'const', 'continue', 'default',
============================================================
Index: conform/data/arpa/inet.h-data
--- conform/data/arpa/inet.h-data created
+++ conform/data/arpa/inet.h-data Sat Apr 29 19:02:07 2000 1.1
@@ -0,0 +1,31 @@
+#ifndef ISO
+// in_port_t should have exactly 16 bits
+type in_port_t
+// in_addr_t should have exactly 32 bits
+type in_addr_t
+
+type uint32_t
+type uint16_t
+
+macro INET_ADDRSTRLEN
+macro INET6_ADDRSTRLEN
+
+// The following can be declared as functions, defined as macros or both:
+function uint32_t htonl (uint32_t);
+function uint16_t htons (uint16_t);
+function uint32_t ntohl (uint32_t);
+function uint16_t htons (uint16_t);
+
+function in_addr_t inet_addr (const char*);
+function in_addr_t inet_lnaof (struct in_addr);
+function {struct in_addr} inet_makeaddr (in_addr_t, in_addr_t);
+function in_addrt_t inet_netof (struct in_addr);
+function in_addrt_t inet_network (const char *);
+function {char*} inet_ntoa (struct in_addr);
+function {const char*} inet_ntop (int, const void*, char*, socklen_t);
+function int inet_pton (int, const char*, void*);
+
+allow-header netinet/in.h
+allow-header inttypes.h
+
+#endif
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.rhein-neckar.de
More information about the Libc-hacker
mailing list