From owner-svn-src-head@FreeBSD.ORG Wed Nov 5 12:02:25 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C96A1106568E; Wed, 5 Nov 2008 12:02:25 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B815C8FC3D; Wed, 5 Nov 2008 12:02:25 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA5C2PYi026303; Wed, 5 Nov 2008 12:02:25 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA5C2PdK026302; Wed, 5 Nov 2008 12:02:25 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200811051202.mA5C2PdK026302@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 5 Nov 2008 12:02:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184682 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Nov 2008 12:02:26 -0000 Author: bz Date: Wed Nov 5 12:02:25 2008 New Revision: 184682 URL: http://svn.freebsd.org/changeset/base/184682 Log: Make compile without INET. The change is modelled after the way it was done for (without) INET6. MFC after: 2 months Modified: head/sys/net/if_spppsubr.c Modified: head/sys/net/if_spppsubr.c ============================================================================== --- head/sys/net/if_spppsubr.c Wed Nov 5 11:54:56 2008 (r184681) +++ head/sys/net/if_spppsubr.c Wed Nov 5 12:02:25 2008 (r184682) @@ -372,8 +372,10 @@ static void sppp_chap_scr(struct sppp *s static const char *sppp_auth_type_name(u_short proto, u_char type); static const char *sppp_cp_type_name(u_char type); +#ifdef INET static const char *sppp_dotted_quad(u_long addr); static const char *sppp_ipcp_opt_name(u_char opt); +#endif #ifdef INET6 static const char *sppp_ipv6cp_opt_name(u_char opt); #endif @@ -388,7 +390,9 @@ static void sppp_phase_network(struct sp static void sppp_print_bytes(const u_char *p, u_short len); static void sppp_print_string(const char *p, u_short len); static void sppp_qflush(struct ifqueue *ifq); +#ifdef INET static void sppp_set_ip_addr(struct sppp *sp, u_long src); +#endif #ifdef INET6 static void sppp_get_ip6_addrs(struct sppp *sp, struct in6_addr *src, struct in6_addr *dst, struct in6_addr *srcmask); @@ -523,9 +527,11 @@ sppp_input(struct ifnet *ifp, struct mbu struct ppp_header *h; int isr = -1; struct sppp *sp = IFP2SP(ifp); + int debug, do_account = 0; +#ifdef INET + int hlen, vjlen; u_char *iphdr; - int hlen, vjlen, do_account = 0; - int debug; +#endif SPPP_LOCK(sp); debug = ifp->if_flags & IFF_DEBUG; @@ -800,7 +806,9 @@ sppp_output(struct ifnet *ifp, struct mb struct ppp_header *h; struct ifqueue *ifq = NULL; int s, error, rv = 0; +#ifdef INET int ipproto = PPP_IP; +#endif int debug = ifp->if_flags & IFF_DEBUG; s = splimp(); @@ -2884,6 +2892,7 @@ sppp_lcp_check_and_close(struct sppp *sp *--------------------------------------------------------------------------* */ +#ifdef INET static void sppp_ipcp_init(struct sppp *sp) { @@ -3362,6 +3371,78 @@ sppp_ipcp_scr(struct sppp *sp) sp->confid[IDX_IPCP] = ++sp->pp_seq[IDX_IPCP]; sppp_cp_send(sp, PPP_IPCP, CONF_REQ, sp->confid[IDX_IPCP], i, &opt); } +#else /* !INET */ +static void +sppp_ipcp_init(struct sppp *sp) +{ +} + +static void +sppp_ipcp_up(struct sppp *sp) +{ +} + +static void +sppp_ipcp_down(struct sppp *sp) +{ +} + +static void +sppp_ipcp_open(struct sppp *sp) +{ +} + +static void +sppp_ipcp_close(struct sppp *sp) +{ +} + +static void +sppp_ipcp_TO(void *cookie) +{ +} + +static int +sppp_ipcp_RCR(struct sppp *sp, struct lcp_header *h, int len) +{ + return (0); +} + +static void +sppp_ipcp_RCN_rej(struct sppp *sp, struct lcp_header *h, int len) +{ +} + +static void +sppp_ipcp_RCN_nak(struct sppp *sp, struct lcp_header *h, int len) +{ +} + +static void +sppp_ipcp_tlu(struct sppp *sp) +{ +} + +static void +sppp_ipcp_tld(struct sppp *sp) +{ +} + +static void +sppp_ipcp_tls(struct sppp *sp) +{ +} + +static void +sppp_ipcp_tlf(struct sppp *sp) +{ +} + +static void +sppp_ipcp_scr(struct sppp *sp) +{ +} +#endif /* *--------------------------------------------------------------------------* @@ -4869,6 +4950,7 @@ sppp_get_ip_addrs(struct sppp *sp, u_lon if (src) *src = ntohl(ssrc); } +#ifdef INET /* * Set my IP address. Must be called at splimp. */ @@ -4922,6 +5004,7 @@ sppp_set_ip_addr(struct sppp *sp, u_long } } } +#endif #ifdef INET6 /* @@ -5292,6 +5375,7 @@ sppp_lcp_opt_name(u_char opt) return buf; } +#ifdef INET static const char * sppp_ipcp_opt_name(u_char opt) { @@ -5304,6 +5388,7 @@ sppp_ipcp_opt_name(u_char opt) snprintf (buf, sizeof(buf), "ipcp/0x%x", opt); return buf; } +#endif #ifdef INET6 static const char * @@ -5389,6 +5474,7 @@ sppp_print_string(const char *p, u_short } } +#ifdef INET static const char * sppp_dotted_quad(u_long addr) { @@ -5400,6 +5486,7 @@ sppp_dotted_quad(u_long addr) (int)(addr & 0xff)); return s; } +#endif static int sppp_strnlen(u_char *p, int max)