in6_src.c (171259) | in6_src.c (171260) |
---|---|
1/* $FreeBSD: head/sys/netinet6/in6_src.c 171259 2007-07-05 16:23:49Z delphij $ */ | 1/* $FreeBSD: head/sys/netinet6/in6_src.c 171260 2007-07-05 16:29:40Z delphij $ */ |
2/* $KAME: in6_src.c,v 1.132 2003/08/26 04:42:27 keiichi Exp $ */ 3 4/*- 5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions --- 132 unchanged lines hidden (view full) --- 142 /* printf("in6_selectsrc: replace %s with %s by %d\n", ia_best ? ip6_sprintf(&ia_best->ia_addr.sin6_addr) : "none", ip6_sprintf(&ia->ia_addr.sin6_addr), (r)); */ \ 143 goto replace; \ 144} while(0) 145#define NEXT(r) do {\ 146 if ((r) < sizeof(ip6stat.ip6s_sources_rule) / \ 147 sizeof(ip6stat.ip6s_sources_rule[0])) /* check for safety */ \ 148 ip6stat.ip6s_sources_rule[(r)]++; \ 149 /* printf("in6_selectsrc: keep %s against %s by %d\n", ia_best ? ip6_sprintf(&ia_best->ia_addr.sin6_addr) : "none", ip6_sprintf(&ia->ia_addr.sin6_addr), (r)); */ \ | 2/* $KAME: in6_src.c,v 1.132 2003/08/26 04:42:27 keiichi Exp $ */ 3 4/*- 5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions --- 132 unchanged lines hidden (view full) --- 142 /* printf("in6_selectsrc: replace %s with %s by %d\n", ia_best ? ip6_sprintf(&ia_best->ia_addr.sin6_addr) : "none", ip6_sprintf(&ia->ia_addr.sin6_addr), (r)); */ \ 143 goto replace; \ 144} while(0) 145#define NEXT(r) do {\ 146 if ((r) < sizeof(ip6stat.ip6s_sources_rule) / \ 147 sizeof(ip6stat.ip6s_sources_rule[0])) /* check for safety */ \ 148 ip6stat.ip6s_sources_rule[(r)]++; \ 149 /* printf("in6_selectsrc: keep %s against %s by %d\n", ia_best ? ip6_sprintf(&ia_best->ia_addr.sin6_addr) : "none", ip6_sprintf(&ia->ia_addr.sin6_addr), (r)); */ \ |
150 goto next; /* XXX: we can't use 'continue' here */ \ | 150 goto next; /* XXX: we can't use 'continue' here */ \ |
151} while(0) 152#define BREAK(r) do { \ 153 if ((r) < sizeof(ip6stat.ip6s_sources_rule) / \ 154 sizeof(ip6stat.ip6s_sources_rule[0])) /* check for safety */ \ 155 ip6stat.ip6s_sources_rule[(r)]++; \ | 151} while(0) 152#define BREAK(r) do { \ 153 if ((r) < sizeof(ip6stat.ip6s_sources_rule) / \ 154 sizeof(ip6stat.ip6s_sources_rule[0])) /* check for safety */ \ 155 ip6stat.ip6s_sources_rule[(r)]++; \ |
156 goto out; /* XXX: we can't use 'break' here */ \ | 156 goto out; /* XXX: we can't use 'break' here */ \ |
157} while(0) 158 159struct in6_addr * 160in6_selectsrc(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts, 161 struct ip6_moptions *mopts, struct route_in6 *ro, 162 struct in6_addr *laddr, struct ifnet **ifpp, int *errorp) 163{ 164 struct in6_addr dst; --- 917 unchanged lines hidden --- | 157} while(0) 158 159struct in6_addr * 160in6_selectsrc(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts, 161 struct ip6_moptions *mopts, struct route_in6 *ro, 162 struct in6_addr *laddr, struct ifnet **ifpp, int *errorp) 163{ 164 struct in6_addr dst; --- 917 unchanged lines hidden --- |