Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Jun 2009 23:11:21 GMT
From:      Ana Kukec <anchie@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 163844 for review
Message-ID:  <200906082311.n58NBLMD044671@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=163844

Change 163844 by anchie@anchie_malimis on 2009/06/08 23:10:25

	Adding some code for SeND input_hook processing.	

Affected files ...

.. //depot/projects/soc2009/anchie_send/send_0.2/sendd/net.c#2 edit
.. //depot/projects/soc2009/anchie_send/send_0.2/sendd/snd_proto.h#2 edit
.. //depot/projects/soc2009/anchie_send/src/sys/netinet6/icmp6.c#4 edit
.. //depot/projects/soc2009/anchie_send/src/sys/netinet6/send.c#6 edit
.. //depot/projects/soc2009/anchie_send/src/sys/netinet6/send.h#6 edit

Differences ...

==== //depot/projects/soc2009/anchie_send/send_0.2/sendd/net.c#2 (text+ko) ====

@@ -119,6 +119,7 @@
 snd_icmp_sock_read(void)
 {
 	struct sockaddr_in6 sin[1];
+	struct input_hook_packet_info pi;
 	struct sbuff *b;
 	uint8_t *type;
 	socklen_t slen;
@@ -147,6 +148,9 @@
 		goto done;
 	}
 
+	/* Populate input_hook_packet_info structure! */
+	/* Populate ifidx and in integers. */
+
 	type = sbuff_data(b);
 	switch (*type) {
 	case ICMP6_SND_CPS:
@@ -160,7 +164,8 @@
 			       &sin->sin6_addr);
 		break;
 	default:
-		DBG(&dbg_snd, "Unhandled ICMP6 type %d", *type);
+		snd_recv_pkt(sbuff_data(b), ifidx, in, pi);
+
 		break;
 	}
 

==== //depot/projects/soc2009/anchie_send/send_0.2/sendd/snd_proto.h#2 (text+ko) ====

@@ -49,6 +49,12 @@
 
 #define NDISC_OPT_SPACE(len) (((len)+2+7)&~7)
 
+#define ND_ROUTER_SOLICIT	133
+#define ND_ROUTER_ADVERT	134
+#define ND_NEIGHBOR_SOLICIT	135
+#define ND_NEIGHBOR_ADVERT	136
+#define ND_REDIRECT		137
+
 #define	ICMP6_SND_CPS		148
 #define	ICMP6_SND_CPA		149
 

==== //depot/projects/soc2009/anchie_send/src/sys/netinet6/icmp6.c#4 (text+ko) ====

@@ -802,6 +802,8 @@
 		if ((n = m_copym(m, 0, M_COPYALL, M_DONTWAIT)) == NULL) {
 
 		/* send incoming SeND-protected/ND packet to sendd */
+		if (send_input_hook != NULL)
+			send_input_hook();
 
 			/* give up local */
 			nd6_ns_input(m, off, icmp6len);

==== //depot/projects/soc2009/anchie_send/src/sys/netinet6/send.c#6 (text+ko) ====

@@ -5,6 +5,8 @@
 #include <sys/kernel.h>
 #include <sys/systm.h>
 
+#include <netinet6/nd6.h>
+
 #include <send.h>
 
 static int	X_send_input_hook(void);
@@ -12,6 +14,9 @@
 static int
 X_send_input_hook(void)
 {
+
+	/* send module is loaded, send incoming packet to sendd */	
+
 	return 0;
 }
 

==== //depot/projects/soc2009/anchie_send/src/sys/netinet6/send.h#6 (text+ko) ====

@@ -1,2 +1,2 @@
 /* send.c */
-int	(*send_input_hook)(void);
+int	(*send_input_hook)(struct mbuf *, int, int);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906082311.n58NBLMD044671>