From owner-freebsd-net Mon Aug 7 10:25:17 2000 Delivered-To: freebsd-net@freebsd.org Received: from wireless.net (wireless.net [207.137.156.159]) by hub.freebsd.org (Postfix) with ESMTP id D36C337B9BD for ; Mon, 7 Aug 2000 10:25:13 -0700 (PDT) (envelope-from bad@wireless.net) Received: from localhost (bad@localhost) by wireless.net (8.9.3/8.9.3) with SMTP id KAA08902; Mon, 7 Aug 2000 10:25:02 -0700 (PDT) Date: Mon, 7 Aug 2000 10:25:02 -0700 (PDT) From: Bernie Doehner To: itojun@iijlab.net Cc: net@freebsd.org Subject: Re: Restoring old IPv4 raw socket behavior under 4.1-RELEASE In-Reply-To: <21905.965666902@coconut.itojun.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Tue, 8 Aug 2000 itojun@iijlab.net wrote: > > >Just upgraded from 4.0-RELEASE to 4.1-RELEASE, and now a custom > >application of ours that used to do: > > > >socket(AF_INET, SOCK_RAW, 4); > > > >No longer works with: > >Protocol not supported opening socket. > > > >As far as I can tell, this is because SOCK_RAW sockets now default to > >IPv6. Is there a SIMPLE way to restore old ipv4 SOCK_RAW > >socket() behavior, so that I don't need to have any IPv6 routes at all? > > no, the observation is incorrect. we simply need rip_{output,ctloutput} > family listed in protosw. > > itojun > Hi Itojun: Thanks for responding.. This all seems to be new. I don't remmember any rip_ functions. Is there documentation somewhere on how to do this? It's the first time I have ever seen this. I see the { SOCK_RAW, &inetdomain, IPPROTO_IPV4, PR_ATOMIC|PR_ADDR, encap4_input, 0, 0, rip_ctloutput, .... } entry in in_proto.c. Isn't that what sets up the binding between AF_INET and SOCK_RAW and protocol 4? Thanks for unconfusing me. Bernie To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message