| version 1.23, 1996/01/31 03:49:31 |
version 1.24, 1996/02/13 23:43:29 |
|
|
| #include <netinet/ip_var.h> |
#include <netinet/ip_var.h> |
| #include <netinet/ip_mroute.h> |
#include <netinet/ip_mroute.h> |
| #include <netinet/in_pcb.h> |
#include <netinet/in_pcb.h> |
| |
#include <netinet/in_var.h> |
| |
|
| |
#include <machine/stdarg.h> |
| |
|
| struct inpcbtable rawcbtable; |
struct inpcbtable rawcbtable; |
| |
|
| Line 83 struct sockaddr_in ripsrc = { sizeof(rip |
|
| Line 86 struct sockaddr_in ripsrc = { sizeof(rip |
|
| * mbuf chain. |
* mbuf chain. |
| */ |
*/ |
| void |
void |
| rip_input(m) |
#if __STDC__ |
| |
rip_input(struct mbuf *m, ...) |
| |
#else |
| |
rip_input(m, va_alist) |
| struct mbuf *m; |
struct mbuf *m; |
| |
va_dcl |
| |
#endif |
| { |
{ |
| register struct ip *ip = mtod(m, struct ip *); |
register struct ip *ip = mtod(m, struct ip *); |
| register struct inpcb *inp; |
register struct inpcb *inp; |
|
|
| continue; |
continue; |
| if (last) { |
if (last) { |
| struct mbuf *n; |
struct mbuf *n; |
| if (n = m_copy(m, 0, (int)M_COPYALL)) { |
if ((n = m_copy(m, 0, (int)M_COPYALL)) != NULL) { |
| if (sbappendaddr(&last->so_rcv, |
if (sbappendaddr(&last->so_rcv, |
| sintosa(&ripsrc), n, |
sintosa(&ripsrc), n, |
| (struct mbuf *)0) == 0) |
(struct mbuf *)0) == 0) |
|
|
| * Tack on options user may have setup with control call. |
* Tack on options user may have setup with control call. |
| */ |
*/ |
| int |
int |
| rip_output(m, so, dst) |
#if __STDC__ |
| register struct mbuf *m; |
rip_output(struct mbuf *m, ...) |
| |
#else |
| |
rip_output(m, va_alist) |
| |
struct mbuf *m; |
| |
va_dcl |
| |
#endif |
| |
{ |
| struct socket *so; |
struct socket *so; |
| u_long dst; |
u_long dst; |
| { |
|
| register struct ip *ip; |
register struct ip *ip; |
| register struct inpcb *inp = sotoinpcb(so); |
register struct inpcb *inp; |
| struct mbuf *opts; |
struct mbuf *opts; |
| int flags = (so->so_options & SO_DONTROUTE) | IP_ALLOWBROADCAST; |
int flags; |
| |
va_list ap; |
| |
|
| |
va_start(ap, m); |
| |
so = va_arg(ap, struct socket *); |
| |
dst = va_arg(ap, u_long); |
| |
va_end(ap); |
| |
|
| |
inp = sotoinpcb(so); |
| |
flags = (so->so_options & SO_DONTROUTE) | IP_ALLOWBROADCAST; |
| |
|
| /* |
/* |
| * If the user handed us a complete IP packet, use it. |
* If the user handed us a complete IP packet, use it. |
| Line 182 rip_ctloutput(op, so, level, optname, m) |
|
| Line 204 rip_ctloutput(op, so, level, optname, m) |
|
| struct mbuf **m; |
struct mbuf **m; |
| { |
{ |
| register struct inpcb *inp = sotoinpcb(so); |
register struct inpcb *inp = sotoinpcb(so); |
| register int error; |
|
| |
|
| if (level != IPPROTO_IP) { |
if (level != IPPROTO_IP) { |
| if (m != 0 && *m != 0) |
if (m != 0 && *m != 0) |