Update of /cvsroot/irc-dev/ipv6/include
In directory usw-pr-cvs1:/tmp/cvs-serv18553/include
Modified Files:
inet.h match.h patchlevel.h support.h
Log Message:
INET6.5
Index: inet.h
===================================================================
RCS file: /cvsroot/irc-dev/ipv6/include/inet.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- inet.h 14 Sep 2002 14:42:04 -0000 1.4
+++ inet.h 14 Sep 2002 22:44:50 -0000 1.5
@@ -27,6 +27,63 @@
#include <sys/socket.h>
+#ifdef INET6
+/*
+ * Macros y estructuras IPv6
+ */
+#define AFINET AF_INET6
+#define SOCKADDR_IN sockaddr_in6
+#define SOCKADDR sockaddr
+#define SIN_FAMILY sin6_family
+#define SIN_PORT sin6_port
+#define SIN_ADDR sin6_addr
+#define S_ADDR s6_addr
+#define IN_ADDR in6_addr
+
+# if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(bsdi)
+# ifndef s6_laddr
+# define s6_laddr s6_addr32
+# endif
+# endif
+
+/* Delimitador de campos de las lineas del ircd.conf */
+#define IRCDCONF_DELIMITER '%'
+
+/* Localhost loopback */
+#ifndef IN6_IS_ADDR_LOOPBACK
+#define IN6_IS_ADDR_LOOPBACK(a) \
+ (((const unsigned int *) (a))[0] == 0 \
+ && ((const unsigned int *) (a))[1] == 0 \
+ && ((const unsigned int *) (a))[2] == 0 \
+ && ((const unsigned int *) (a))[3] == htonl (1))
+#endif
+
+#define AND16(x) \
+ ((x)[0]&(x)[1]&(x)[2]&(x)[3] \
+ &(x)[4]&(x)[5]&(x)[6]&(x)[7] \
+ &(x)[8]&(x)[9]&(x)[10]&(x)[11] \
+ &(x)[12]&(x)[13]&(x)[14]&(x)[15])
+
+#define WHOSTENTP(x) \
+ ((x)[0]|(x)[1]|(x)[2]|(x)[3] \
+ |(x)[4]|(x)[5]|(x)[6]|(x)[7] \
+ |(x)[8]|(x)[9]|(x)[10]|(x)[11] \
+ |(x)[12]|(x)[13]|(x)[14]|(x)[15])
+
+static unsigned char minus_one[] =
+ { 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ 255, 255, 255, 255, 255, 255, 255, 0
+};
+
+
+/* Tamanios */
+#ifndef INADDRSZ
+#define INADDRSZ sizeof(struct IN_ADDR)
+#define IN6ADDRSZ sizeof(struct IN_ADDR)
+#endif
+
+
+#else /* !INET6 */
/*
* Macros y estructuras IPv4
*/
@@ -41,6 +98,31 @@
/* Delimitador de campos de las lineas del ircd.conf */
#define IRCDCONF_DELIMITER ':'
+
+#define WHOSTENTP(x) (x)
+
+/* Localhost loopback */
+#ifndef IN_LOOPBACKNET
+#define IN_LOOPBACKNET 0x7f /* 127 */
+#endif
+
+/* Escuchar a todas las interfaces */
+#ifndef INADDR_ANY
+#define INADDR_ANY 0x00000000
+#endif
+
+/* Indica un error */
+#ifndef INADDR_NONE
+#define INADDR_NONE 0xffffffff
+#endif
+
+
+/* Tamanios */
+#ifndef INADDRSZ
+#define INADDRSZ sizeof(struct IN_ADDR)
+#endif
+
+#endif /* INET6 */
#ifndef INADDR_NONE
#define INADDR_NONE 0xffffffff
Index: match.h
===================================================================
RCS file: /cvsroot/irc-dev/ipv6/include/match.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- match.h 12 Sep 2002 19:02:14 -0000 1.3
+++ match.h 14 Sep 2002 22:44:51 -0000 1.4
@@ -10,8 +10,14 @@
*/
struct in_mask {
+#ifdef INET6
+ /* still IPv4 */
+ struct in_addr bits;
+ struct in_addr mask;
+#else
struct IN_ADDR bits;
struct IN_ADDR mask;
+#endif
int fall;
};
Index: patchlevel.h
===================================================================
RCS file: /cvsroot/irc-dev/ipv6/include/patchlevel.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- patchlevel.h 14 Sep 2002 14:42:05 -0000 1.5
+++ patchlevel.h 14 Sep 2002 22:44:51 -0000 1.6
@@ -49,7 +49,7 @@
\
\
\
- "+INET6.4"
+ "+INET6.5"
/*
* Deliberate empty lines
Index: support.h
===================================================================
RCS file: /cvsroot/irc-dev/ipv6/include/support.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- support.h 12 Sep 2002 19:02:14 -0000 1.3
+++ support.h 14 Sep 2002 22:44:51 -0000 1.4
@@ -15,6 +15,9 @@
extern void dumpcore(const char *pattern, ...)
__attribute__ ((format(printf, 1, 2)));
extern char *inetntoa(struct IN_ADDR in);
+#ifdef INET6
+extern int inetpton(int af, const char *src, void *dst);
+#endif
extern int check_if_ipmask(const char *mask);
extern void write_log(const char *filename, const char *pattern, ...);
|