comparison test/strinit.c @ 548:650717de878b

*** empty log message ***
author kono
date Tue, 03 Jan 2006 15:40:57 +0900
parents 9defd9459016
children df60b120675d
comparison
equal deleted inserted replaced
547:9defd9459016 548:650717de878b
137 .dport = dport } } }; 137 .dport = dport } } };
138 138
139 printf("%d %d\n",fl.oif,fl.uli_u.ports.dport); 139 printf("%d %d\n",fl.oif,fl.uli_u.ports.dport);
140 } 140 }
141 141
142 static
143 int ip_route_connect0(/* struct rtable **rp, */ u32 dst,
144 u32 src, u32 tos, int oif, u8 protocol,
145 u16 sport, u16 dport /*, struct sock *sk */)
146 {
147 struct flowi fl = { .oif = oif,
148 .iif = 55,
149 .nl_u = { .ip4_u = { .daddr = dst,
150 .saddr = 66,
151 .tos = tos } },
152 .proto = protocol,
153 .uli_u = { .ports =
154 { .sport = sport,
155 .dport = dport } } };
156
157 printf("%d %d\n",fl.oif,fl.uli_u.ports.dport);
158 printf("%d %d\n",fl.iif,fl.nl_u.ip4_u.saddr);
159 }
160
142 void 161 void
143 linux_kernel() 162 linux_kernel()
144 { 163 {
164 ip_route_connect0(1,2,3,4,5,6,7);
145 ip_route_connect(1,2,3,4,5,6,7); 165 ip_route_connect(1,2,3,4,5,6,7);
166 ip_route_connect(11,12,13,14,15,16,17);
146 } 167 }
147 168
148 // end 169 // end