Make rip_input() take the header length

Move ipip_input() and rsvp_input() prototypes to ip_var.h
Remove unused prototype for rip_ip_input() from ip_var.h
Remove unused variable *opts from rip_output()
This commit is contained in:
Bill Fenner 1996-03-26 19:16:46 +00:00
parent fbc6ab006d
commit e62b8c4939
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=14824
6 changed files with 20 additions and 29 deletions

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* @(#)igmp.c 8.1 (Berkeley) 7/19/93
* $Id: igmp.c,v 1.15 1995/12/09 20:43:51 phk Exp $
* $Id: igmp.c,v 1.16 1996/03/14 16:59:16 fenner Exp $
*/
/*
@ -331,7 +331,7 @@ igmp_input(m, iphlen)
* Pass all valid IGMP packets up to any process(es) listening
* on a raw IGMP socket.
*/
rip_input(m);
rip_input(m, iphlen);
}
void

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)in_proto.c 8.2 (Berkeley) 2/9/95
* $Id: in_proto.c,v 1.25 1996/02/08 15:43:35 wollman Exp $
* $Id: in_proto.c,v 1.26 1996/03/11 15:13:15 davidg Exp $
*/
#include <sys/param.h>
@ -89,9 +89,6 @@ int tp_ctloutput(), tp_usrreq();
void eoninput(), eonctlinput(), eonprotoinit();
#endif /* EON */
void rsvp_input(struct mbuf *, int);
void ipip_input(struct mbuf *, int);
extern struct domain inetdomain;
struct protosw inetsw[] = {

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ip_icmp.c 8.2 (Berkeley) 1/4/94
* $Id: ip_icmp.c,v 1.16 1995/12/14 09:53:40 phk Exp $
* $Id: ip_icmp.c,v 1.17 1995/12/16 02:14:16 bde Exp $
*/
#include <sys/param.h>
@ -466,7 +466,7 @@ reflect:
}
raw:
rip_input(m);
rip_input(m, hlen);
return;
freeit:

View File

@ -9,7 +9,7 @@
* Modified by Bill Fenner, PARC, April 1995
*
* MROUTING Revision: 3.5
* $Id: ip_mroute.c,v 1.29 1996/03/11 15:13:17 davidg Exp $
* $Id: ip_mroute.c,v 1.30 1996/03/11 17:11:23 fenner Exp $
*/
#include "opt_mrouting.h"
@ -39,8 +39,6 @@
#include <netinet/ip_mroute.h>
#include <netinet/udp.h>
extern void rsvp_input __P((struct mbuf *m, int iphlen));
#ifndef NTOHL
#if BYTE_ORDER != BIG_ENDIAN
#define NTOHL(d) ((d) = ntohl((d)))
@ -56,7 +54,6 @@ extern void rsvp_input __P((struct mbuf *m, int iphlen));
#endif
#ifndef MROUTING
extern void ipip_input __P((struct mbuf *m));
extern u_long _ip_mcast_src __P((int vifi));
extern int _ip_mforward __P((struct ip *ip, struct ifnet *ifp,
struct mbuf *m, struct ip_moptions *imo));
@ -145,15 +142,15 @@ rsvp_input(m, iphlen) /* XXX must fixup manually */
if (ip_rsvpd != NULL) {
if (rsvpdebug)
printf("rsvp_input: Sending packet up old-style socket\n");
rip_input(m);
rip_input(m, iphlen);
return;
}
/* Drop the packet */
m_freem(m);
}
void ipip_input(struct mbuf *m) { /* XXX must fixup manually */
rip_input(m);
void ipip_input(struct mbuf *m, int iphlen) { /* XXX must fixup manually */
rip_input(m, iphlen);
}
int (*legal_vif_num)(int) = 0;
@ -205,14 +202,12 @@ ip_rsvp_force_done(so)
* except for netstat or debugging purposes.
*/
#ifndef MROUTE_LKM
extern void ipip_input __P((struct mbuf *m, int iphlen));
struct socket *ip_mrouter = NULL;
struct mrtstat mrtstat;
int ip_mrtproto = IGMP_DVMRP; /* for netstat only */
#else /* MROUTE_LKM */
#error /* the function definition will have a syntax error */
extern void X_ipip_input __P((struct mbuf *m));
extern void X_ipip_input __P((struct mbuf *m, int iphlen));
extern struct mrtstat mrtstat;
static int ip_mrtproto;
#endif
@ -1637,7 +1632,7 @@ encap_send(ip, vifp, m)
*/
void
#ifdef MROUTE_LKM
X_ipip_input(m)
X_ipip_input(m, iphlen)
#else
ipip_input(m, iphlen)
#endif
@ -1652,7 +1647,7 @@ ipip_input(m, iphlen)
register struct vif *vifp;
if (!have_encap_tunnel) {
rip_input(m);
rip_input(m, iphlen);
return;
}
/*
@ -2171,7 +2166,7 @@ rsvp_input(m, iphlen)
if (ip_rsvpd != NULL) {
if (rsvpdebug)
printf("rsvp_input: Sending packet up old-style socket\n");
rip_input(m);
rip_input(m, iphlen);
return;
}

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ip_var.h 8.2 (Berkeley) 1/9/95
* $Id: ip_var.h,v 1.18 1995/12/14 09:53:45 phk Exp $
* $Id: ip_var.h,v 1.19 1996/01/30 22:58:27 mpp Exp $
*/
#ifndef _NETINET_IP_VAR_H_
@ -177,19 +177,18 @@ struct mbuf *
void ip_stripoptions __P((struct mbuf *, struct mbuf *));
int rip_ctloutput __P((int, struct socket *, int, int, struct mbuf **));
void rip_init __P((void));
void rip_input __P((struct mbuf *));
void rip_input __P((struct mbuf *, int));
int rip_output __P((struct mbuf *, struct socket *, u_long));
int rip_usrreq __P((struct socket *,
int, struct mbuf *, struct mbuf *, struct mbuf *));
void ipip_input __P((struct mbuf *, int));
void rsvp_input __P((struct mbuf *, int));
int ip_rsvp_init __P((struct socket *));
int ip_rsvp_done __P((void));
int ip_rsvp_vif_init __P((struct socket *, struct mbuf *));
int ip_rsvp_vif_done __P((struct socket *, struct mbuf *));
void ip_rsvp_force_done __P((struct socket *));
void rip_ip_input __P((struct mbuf *mm,
register struct socket *ip_mrouter, struct sockaddr *src));
#endif
#endif

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)raw_ip.c 8.7 (Berkeley) 5/15/95
* $Id: raw_ip.c,v 1.28 1996/03/11 15:13:24 davidg Exp $
* $Id: raw_ip.c,v 1.29 1996/03/13 08:02:45 pst Exp $
*/
#include <sys/param.h>
@ -93,8 +93,9 @@ static struct sockaddr_in ripsrc = { sizeof(ripsrc), AF_INET };
* mbuf chain.
*/
void
rip_input(m)
rip_input(m, iphlen)
struct mbuf *m;
int iphlen;
{
register struct ip *ip = mtod(m, struct ip *);
register struct inpcb *inp;
@ -149,7 +150,6 @@ rip_output(m, so, dst)
{
register struct ip *ip;
register struct inpcb *inp = sotoinpcb(so);
struct mbuf *opts;
int flags = (so->so_options & SO_DONTROUTE) | IP_ALLOWBROADCAST;
/*