-int in_broadcast __P((struct in_addr, struct ifnet *));
-int in_canforward __P((struct in_addr));
-int in_cksum __P((struct mbuf *, int));
-int in_cksum_skip __P((struct mbuf *, u_short, u_short));
-u_short in_addword __P((u_short, u_short));
-u_short in_pseudo __P((u_int, u_int, u_int));
-int in_localaddr __P((struct in_addr));
-char *inet_ntoa __P((struct in_addr)); /* in libkern */
-u_long in_netof __P((struct in_addr));
-#endif /* __APPLE_API_PRIVATE */
+extern int in_broadcast(struct in_addr, struct ifnet *);
+extern int in_canforward(struct in_addr);
+
+#define in_cksum(m, l) inet_cksum(m, 0, 0, l)
+#define in_cksum_skip(m, l, o) inet_cksum(m, 0, o, (l) - (o))
+
+extern u_int16_t inet_cksum(struct mbuf *m, unsigned int proto,
+ unsigned int offset, unsigned int transport_len);
+extern u_short in_addword(u_short, u_short);
+extern u_short in_pseudo(u_int, u_int, u_int);
+
+extern int in_localaddr(struct in_addr);
+extern u_int32_t in_netof(struct in_addr);
+
+extern int inaddr_local(struct in_addr);
+#endif /* KERNEL_PRIVATE */
+#define MAX_IPv4_STR_LEN 16
+#define MAX_IPv6_STR_LEN 64
+
+extern const char *inet_ntop(int, const void *, char *, socklen_t); /* in libkern */