diff test/strinit.c @ 548:650717de878b

*** empty log message ***
author kono
date Tue, 03 Jan 2006 15:40:57 +0900
parents 9defd9459016
children df60b120675d
line wrap: on
line diff
--- a/test/strinit.c	Tue Jan 03 12:02:26 2006 +0900
+++ b/test/strinit.c	Tue Jan 03 15:40:57 2006 +0900
@@ -139,10 +139,31 @@
 	printf("%d %d\n",fl.oif,fl.uli_u.ports.dport);
 }
 
+static 
+int ip_route_connect0(/* struct rtable **rp, */ u32 dst,
+                                   u32 src, u32 tos, int oif, u8 protocol,
+                                   u16 sport, u16 dport /*, struct sock *sk */)
+{
+        struct flowi fl = { .oif = oif,
+			    .iif = 55,
+                            .nl_u = { .ip4_u = { .daddr = dst,
+                                                 .saddr = 66,
+                                                 .tos = tos } },
+                            .proto = protocol,
+                            .uli_u = { .ports =
+                                       { .sport = sport,
+                                         .dport = dport } } };
+
+	printf("%d %d\n",fl.oif,fl.uli_u.ports.dport);
+	printf("%d %d\n",fl.iif,fl.nl_u.ip4_u.saddr);
+}
+
 void
 linux_kernel()
 {
+    ip_route_connect0(1,2,3,4,5,6,7);
     ip_route_connect(1,2,3,4,5,6,7);
+    ip_route_connect(11,12,13,14,15,16,17);
 }
 
 // end