The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/bsd/net/rtsock_mip.c

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*
    2  * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
    3  *
    4  * @APPLE_LICENSE_HEADER_START@
    5  * 
    6  * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
    7  * 
    8  * This file contains Original Code and/or Modifications of Original Code
    9  * as defined in and that are subject to the Apple Public Source License
   10  * Version 2.0 (the 'License'). You may not use this file except in
   11  * compliance with the License. Please obtain a copy of the License at
   12  * http://www.opensource.apple.com/apsl/ and read it before using this
   13  * file.
   14  * 
   15  * The Original Code and all software distributed under the License are
   16  * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
   17  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
   18  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
   19  * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
   20  * Please see the License for the specific language governing rights and
   21  * limitations under the License.
   22  * 
   23  * @APPLE_LICENSE_HEADER_END@
   24  */
   25 /*      $KAME$  */
   26 
   27 /* to be included from net/rtsock.c - ugly but necessary for portability */
   28 /*
   29  * Mobile IPv6 addition.
   30  * Send a routing message to all routing socket listeners.
   31  */
   32 void
   33 rt_mip6msg(cmd, ifp, rt)
   34         int cmd;
   35         struct ifnet *ifp;
   36         register struct rtentry *rt;
   37 {
   38         struct rt_addrinfo info;
   39         struct sockaddr *sa = 0;
   40         struct mbuf *m = 0;
   41         register struct rt_msghdr *rtm;
   42 
   43 #ifdef MIP6_DEBUG
   44         printf("route_cb.any_count = %d\n", route_cb.any_count);
   45 #endif
   46         bzero((caddr_t)&info, sizeof(info));
   47 
   48         if (rt == 0 || ifp == 0)
   49                 return;
   50         netmask = rt_mask(rt);
   51         dst = sa = rt_key(rt);
   52         gate = rt->rt_gateway;
   53         genmask = rt->rt_genmask;
   54         if ((m = rt_msg1(cmd, &info)) == NULL) {
   55 #ifdef MIP6_DEBUG
   56                 printf("failure... \n");
   57 #endif
   58                 return;
   59         }
   60         rtm = mtod(m, struct rt_msghdr *);
   61         rtm->rtm_index = ifp->if_index;
   62         rtm->rtm_flags |= rt->rt_flags;
   63         rtm->rtm_rmx = rt->rt_rmx;
   64         rtm->rtm_addrs = info.rti_addrs;
   65         rtm->rtm_flags |= RTF_DONE;
   66 
   67         route_proto.sp_protocol = sa ? sa->sa_family : 0;
   68 #ifdef __bsdi__
   69         raw_input(m, NULL, &route_proto, &route_src, &route_dst);
   70 #else
   71         raw_input(m, &route_proto, &route_src, &route_dst);
   72 #endif
   73 }

Cache object: 3cc277c8227f9a9c2b959889aa0a92d3


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.