[BACK]Return to raw_ip.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / netinet

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/netinet/raw_ip.c between version 1.23 and 1.24

version 1.23, 1996/01/31 03:49:31 version 1.24, 1996/02/13 23:43:29
Line 53 
Line 53 
 #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;
Line 104  rip_input(m)
Line 112  rip_input(m)
                         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)
Line 134  rip_input(m)
Line 142  rip_input(m)
  * 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)

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.24

CVSweb <webmaster@jp.NetBSD.org>