1/* $FreeBSD: head/sys/netinet6/nd6_nbr.c 105194 2002-10-16 01:54:46Z sam $ */
2/* $KAME: nd6_nbr.c,v 1.86 2002/01/21 02:33:04 jinmei 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
--- 489 unchanged lines hidden (view full) ---
499 bcopy(mac, (caddr_t)(nd_opt + 1), ifp->if_addrlen);
500 }
501
502 ip6->ip6_plen = htons((u_short)icmp6len);
503 nd_ns->nd_ns_cksum = 0;
504 nd_ns->nd_ns_cksum
505 = in6_cksum(m, IPPROTO_ICMPV6, sizeof(*ip6), icmp6len);
506
507 ip6_output(m, NULL, NULL, dad ? IPV6_DADOUTPUT : 0, &im6o, &outif, NULL);
508 if (outif) {
509 icmp6_ifstat_inc(outif, ifs6_out_msg);
510 icmp6_ifstat_inc(outif, ifs6_out_neighborsolicit);
511 }
512 icmp6stat.icp6s_outhist[ND_NEIGHBOR_SOLICIT]++;
513}
514
515/*
--- 427 unchanged lines hidden (view full) ---
943 flags &= ~ND_NA_FLAG_OVERRIDE;
944
945 ip6->ip6_plen = htons((u_short)icmp6len);
946 nd_na->nd_na_flags_reserved = flags;
947 nd_na->nd_na_cksum = 0;
948 nd_na->nd_na_cksum =
949 in6_cksum(m, IPPROTO_ICMPV6, sizeof(struct ip6_hdr), icmp6len);
950
951 ip6_output(m, NULL, NULL, 0, &im6o, &outif, NULL);
952 if (outif) {
953 icmp6_ifstat_inc(outif, ifs6_out_msg);
954 icmp6_ifstat_inc(outif, ifs6_out_neighboradvert);
955 }
956 icmp6stat.icp6s_outhist[ND_NEIGHBOR_ADVERT]++;
957}
958
959caddr_t
--- 437 unchanged lines hidden ---
2/* $KAME: nd6_nbr.c,v 1.86 2002/01/21 02:33:04 jinmei 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
--- 489 unchanged lines hidden (view full) ---
499 bcopy(mac, (caddr_t)(nd_opt + 1), ifp->if_addrlen);
500 }
501
502 ip6->ip6_plen = htons((u_short)icmp6len);
503 nd_ns->nd_ns_cksum = 0;
504 nd_ns->nd_ns_cksum
505 = in6_cksum(m, IPPROTO_ICMPV6, sizeof(*ip6), icmp6len);
506
507 ip6_output(m, NULL, NULL, dad ? IPV6_DADOUTPUT : 0, &im6o, &outif, NULL);
508 if (outif) {
509 icmp6_ifstat_inc(outif, ifs6_out_msg);
510 icmp6_ifstat_inc(outif, ifs6_out_neighborsolicit);
511 }
512 icmp6stat.icp6s_outhist[ND_NEIGHBOR_SOLICIT]++;
513}
514
515/*
--- 427 unchanged lines hidden (view full) ---
943 flags &= ~ND_NA_FLAG_OVERRIDE;
944
945 ip6->ip6_plen = htons((u_short)icmp6len);
946 nd_na->nd_na_flags_reserved = flags;
947 nd_na->nd_na_cksum = 0;
948 nd_na->nd_na_cksum =
949 in6_cksum(m, IPPROTO_ICMPV6, sizeof(struct ip6_hdr), icmp6len);
950
951 ip6_output(m, NULL, NULL, 0, &im6o, &outif, NULL);
952 if (outif) {
953 icmp6_ifstat_inc(outif, ifs6_out_msg);
954 icmp6_ifstat_inc(outif, ifs6_out_neighboradvert);
955 }
956 icmp6stat.icp6s_outhist[ND_NEIGHBOR_ADVERT]++;
957}
958
959caddr_t
--- 437 unchanged lines hidden ---