From 66bb118edd283fb9466e44ecd44206889996c921 Mon Sep 17 00:00:00 2001 From: Hajimu UMEMOTO Date: Wed, 22 Oct 2003 18:52:57 +0000 Subject: [PATCH] drop the code of HAVE_NRL_INPCB part. our system doesn't use NRL style INPCB. --- sys/netinet6/icmp6.c | 43 ------------------------------------------ sys/netinet6/in6_src.c | 10 ---------- sys/netkey/key.c | 10 ---------- 3 files changed, 63 deletions(-) diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c index 389d7a20c6aa..5b4c5d807fa4 100644 --- a/sys/netinet6/icmp6.c +++ b/sys/netinet6/icmp6.c @@ -114,35 +114,6 @@ #include -#ifdef HAVE_NRL_INPCB -/* inpcb members */ -#define in6pcb inpcb -#define in6p_laddr inp_laddr6 -#define in6p_faddr inp_faddr6 -#define in6p_icmp6filt inp_icmp6filt -#define in6p_route inp_route -#define in6p_socket inp_socket -#define in6p_flags inp_flags -#define in6p_moptions inp_moptions6 -#define in6p_outputopts inp_outputopts6 -#define in6p_ip6 inp_ipv6 -#define in6p_flowinfo inp_flowinfo -#define in6p_sp inp_sp -#define in6p_next inp_next -#define in6p_prev inp_prev -/* macro names */ -#define sotoin6pcb sotoinpcb -/* function names */ -#define in6_pcbdetach in_pcbdetach -#define in6_rtchange in_rtchange - -/* - * for KAME src sync over BSD*'s. XXX: FreeBSD (>=3) are VERY different from - * others... - */ -#define in6p_ip6_nxt inp_ipv6.ip6_nxt -#endif - extern struct domain inet6domain; struct icmp6stat icmp6stat; @@ -1926,10 +1897,6 @@ icmp6_rip6_input(mp, off) LIST_FOREACH(in6p, &ripcb, inp_list) { if ((in6p->inp_vflag & INP_IPV6) == 0) continue; -#ifdef HAVE_NRL_INPCB - if (!(in6p->in6p_flags & INP_IPV6)) - continue; -#endif if (in6p->in6p_ip6_nxt != IPPROTO_ICMPV6) continue; if (!IN6_IS_ADDR_UNSPECIFIED(&in6p->in6p_laddr) && @@ -2697,11 +2664,6 @@ noredhdropt:; m_freem(m0); } -#ifdef HAVE_NRL_INPCB -#define sotoin6pcb sotoinpcb -#define in6pcb inpcb -#define in6p_icmp6filt inp_icmp6filt -#endif /* * ICMPv6 socket option processing. */ @@ -2775,11 +2737,6 @@ icmp6_ctloutput(so, sopt) return (error); } -#ifdef HAVE_NRL_INPCB -#undef sotoin6pcb -#undef in6pcb -#undef in6p_icmp6filt -#endif #ifndef HAVE_PPSRATECHECK #ifndef timersub diff --git a/sys/netinet6/in6_src.c b/sys/netinet6/in6_src.c index aa520b6f9574..a77c8cbaf41e 100644 --- a/sys/netinet6/in6_src.c +++ b/sys/netinet6/in6_src.c @@ -421,13 +421,7 @@ int in6_embedscope(in6, sin6, in6p, ifpp) struct in6_addr *in6; const struct sockaddr_in6 *sin6; -#ifdef HAVE_NRL_INPCB - struct inpcb *in6p; -#define in6p_outputopts inp_outputopts6 -#define in6p_moptions inp_moptions6 -#else struct in6pcb *in6p; -#endif struct ifnet **ifpp; { struct ifnet *ifp = NULL; @@ -480,10 +474,6 @@ in6_embedscope(in6, sin6, in6p, ifpp) return 0; } -#ifdef HAVE_NRL_INPCB -#undef in6p_outputopts -#undef in6p_moptions -#endif /* * generate standard sockaddr_in6 from embedded form. diff --git a/sys/netkey/key.c b/sys/netkey/key.c index f576d80dfa9a..eb156b8414eb 100644 --- a/sys/netkey/key.c +++ b/sys/netkey/key.c @@ -1117,15 +1117,6 @@ key_freeso(so) #ifdef INET6 case PF_INET6: { -#ifdef HAVE_NRL_INPCB - struct inpcb *pcb = sotoinpcb(so); - - /* Does it have a PCB ? */ - if (pcb == NULL) - return; - key_freesp_so(&pcb->inp_sp->sp_in); - key_freesp_so(&pcb->inp_sp->sp_out); -#else struct in6pcb *pcb = sotoin6pcb(so); /* Does it have a PCB ? */ @@ -1133,7 +1124,6 @@ key_freeso(so) return; key_freesp_so(&pcb->in6p_sp->sp_in); key_freesp_so(&pcb->in6p_sp->sp_out); -#endif } break; #endif /* INET6 */