Deleted Added
full compact
scope6.c (148399) scope6.c (165118)
1/* $FreeBSD: head/sys/netinet6/scope6.c 148399 2005-07-25 17:28:39Z ume $ */
1/* $FreeBSD: head/sys/netinet6/scope6.c 165118 2006-12-12 12:17:58Z bz $ */
2/* $KAME: scope6.c,v 1.10 2000/07/24 13:29:31 itojun Exp $ */
3
4/*-
5 * Copyright (C) 2000 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

--- 354 unchanged lines hidden (view full) ---

364
365/*
366 * generate standard sockaddr_in6 from embedded form.
367 */
368int
369sa6_recoverscope(sin6)
370 struct sockaddr_in6 *sin6;
371{
2/* $KAME: scope6.c,v 1.10 2000/07/24 13:29:31 itojun Exp $ */
3
4/*-
5 * Copyright (C) 2000 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

--- 354 unchanged lines hidden (view full) ---

364
365/*
366 * generate standard sockaddr_in6 from embedded form.
367 */
368int
369sa6_recoverscope(sin6)
370 struct sockaddr_in6 *sin6;
371{
372 char ip6buf[INET6_ADDRSTRLEN];
372 u_int32_t zoneid;
373
374 if (sin6->sin6_scope_id != 0) {
375 log(LOG_NOTICE,
376 "sa6_recoverscope: assumption failure (non 0 ID): %s%%%d\n",
373 u_int32_t zoneid;
374
375 if (sin6->sin6_scope_id != 0) {
376 log(LOG_NOTICE,
377 "sa6_recoverscope: assumption failure (non 0 ID): %s%%%d\n",
377 ip6_sprintf(&sin6->sin6_addr), sin6->sin6_scope_id);
378 ip6_sprintf(ip6buf, &sin6->sin6_addr), sin6->sin6_scope_id);
378 /* XXX: proceed anyway... */
379 }
380 if (IN6_IS_SCOPE_LINKLOCAL(&sin6->sin6_addr) ||
381 IN6_IS_ADDR_MC_INTFACELOCAL(&sin6->sin6_addr)) {
382 /*
383 * KAME assumption: link id == interface id
384 */
385 zoneid = ntohs(sin6->sin6_addr.s6_addr16[1]);

--- 110 unchanged lines hidden ---
379 /* XXX: proceed anyway... */
380 }
381 if (IN6_IS_SCOPE_LINKLOCAL(&sin6->sin6_addr) ||
382 IN6_IS_ADDR_MC_INTFACELOCAL(&sin6->sin6_addr)) {
383 /*
384 * KAME assumption: link id == interface id
385 */
386 zoneid = ntohs(sin6->sin6_addr.s6_addr16[1]);

--- 110 unchanged lines hidden ---