File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / pimdd / dvmrp_proto.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Mon Jun 12 07:58:55 2017 UTC (7 years ago) by misho
Branches: pimdd, MAIN
CVS tags: v0_2_1p0, v0_2_1, HEAD
pimdd-dense 0.2.1.0_2

    1: /*
    2:  *  Copyright (c) 1998 by the University of Southern California.
    3:  *  All rights reserved.
    4:  *
    5:  *  Permission to use, copy, modify, and distribute this software and
    6:  *  its documentation in source and binary forms for lawful
    7:  *  purposes and without fee is hereby granted, provided
    8:  *  that the above copyright notice appear in all copies and that both
    9:  *  the copyright notice and this permission notice appear in supporting
   10:  *  documentation, and that any documentation, advertising materials,
   11:  *  and other materials related to such distribution and use acknowledge
   12:  *  that the software was developed by the University of Southern
   13:  *  California and/or Information Sciences Institute.
   14:  *  The name of the University of Southern California may not
   15:  *  be used to endorse or promote products derived from this software
   16:  *  without specific prior written permission.
   17:  *
   18:  *  THE UNIVERSITY OF SOUTHERN CALIFORNIA DOES NOT MAKE ANY REPRESENTATIONS
   19:  *  ABOUT THE SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE.  THIS SOFTWARE IS
   20:  *  PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES,
   21:  *  INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
   22:  *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND 
   23:  *  NON-INFRINGEMENT.
   24:  *
   25:  *  IN NO EVENT SHALL USC, OR ANY OTHER CONTRIBUTOR BE LIABLE FOR ANY
   26:  *  SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES, WHETHER IN CONTRACT,
   27:  *  TORT, OR OTHER FORM OF ACTION, ARISING OUT OF OR IN CONNECTION WITH,
   28:  *  THE USE OR PERFORMANCE OF THIS SOFTWARE.
   29:  *
   30:  *  Other copyrights might apply to parts of this software and are so
   31:  *  noted when applicable.
   32:  */
   33: /*
   34:  *  Questions concerning this software should be directed to 
   35:  *  Pavlin Ivanov Radoslavov (pavlin@catarina.usc.edu)
   36:  *
   37:  *  $Id: dvmrp_proto.c,v 1.1.1.1 2017/06/12 07:58:55 misho Exp $
   38:  */
   39: 
   40: #include "defs.h"
   41: 
   42: 
   43: /* TODO */
   44: /*
   45:  * Process an incoming neighbor probe message.
   46:  */
   47: void
   48: dvmrp_accept_probe(src, dst, p, datalen, level)
   49:     u_int32 src;
   50:     u_int32 dst;
   51:     char *p;
   52:     int datalen;
   53:     u_int32 level;
   54: {
   55:     return;
   56: }
   57: 
   58: 
   59: /* TODO */
   60: /*
   61:  * Process an incoming route report message.
   62:  */
   63: void
   64: dvmrp_accept_report(src, dst, p, datalen, level)
   65:     u_int32 src;
   66:     u_int32 dst; 
   67:     register char *p;
   68:     register int datalen;
   69:     u_int32 level;
   70: {
   71:     return;
   72: }
   73: 
   74: 
   75: /* TODO */
   76: void
   77: dvmrp_accept_info_request(src, dst, p, datalen)
   78:     u_int32 src;
   79:     u_int32 dst;
   80:     u_char *p;
   81:     int datalen;
   82: {
   83:     return;
   84: }
   85: 
   86: 
   87: /*
   88:  * Process an incoming info reply message.
   89:  */
   90: void
   91: dvmrp_accept_info_reply(src, dst, p, datalen)
   92:     u_int32 src;
   93:     u_int32 dst;
   94:     u_char *p;
   95:     int datalen;
   96: {
   97:     IF_DEBUG(DEBUG_PKT)
   98: 	log(LOG_DEBUG, 0, "ignoring spurious DVMRP info reply from %s to %s",
   99: 	    inet_fmt(src, s1), inet_fmt(dst, s2));
  100: }
  101: 
  102: 
  103: /*
  104:  * Process an incoming neighbor-list message.
  105:  */
  106: void
  107: dvmrp_accept_neighbors(src, dst, p, datalen, level)
  108:     u_int32 src;
  109:     u_int32 dst;
  110:     u_char *p;
  111:     int datalen;
  112:     u_int32 level;
  113: {
  114:     log(LOG_INFO, 0, "ignoring spurious DVMRP neighbor list from %s to %s",
  115:         inet_fmt(src, s1), inet_fmt(dst, s2));
  116: }
  117: 
  118: 
  119: /*
  120:  * Process an incoming neighbor-list message.
  121:  */
  122: void
  123: dvmrp_accept_neighbors2(src, dst, p, datalen, level)
  124:     u_int32 src;
  125:     u_int32 dst;
  126:     u_char *p;
  127:     int datalen;
  128:     u_int32 level;
  129: {
  130:     IF_DEBUG(DEBUG_PKT)
  131: 	log(LOG_DEBUG, 0,
  132: 	    "ignoring spurious DVMRP neighbor list2 from %s to %s",
  133: 	    inet_fmt(src, s1), inet_fmt(dst, s2));
  134: }
  135: 
  136: 
  137: /* TODO */
  138: /*
  139:  * Takes the prune message received and then strips it to
  140:  * determine the (src, grp) pair to be pruned.
  141:  *
  142:  * Adds the router to the (src, grp) entry then.
  143:  *
  144:  * Determines if further packets have to be sent down that vif
  145:  *
  146:  * Determines if a corresponding prune message has to be generated
  147:  */
  148: void
  149: dvmrp_accept_prune(src, dst, p, datalen)
  150:     u_int32 src;
  151:     u_int32 dst;
  152:     char *p;
  153:     int datalen;
  154: {
  155:     return;
  156: }
  157: 
  158: 
  159: /* TODO */
  160: /* determine the multicast group and src
  161:  * 
  162:  * if it does, then determine if a prune was sent 
  163:  * upstream.
  164:  * if prune sent upstream, send graft upstream and send
  165:  * ack downstream.
  166:  * 
  167:  * if no prune sent upstream, change the forwarding bit
  168:  * for this interface and send ack downstream.
  169:  *
  170:  * if no entry exists for this group send ack downstream.
  171:  */
  172: void
  173: dvmrp_accept_graft(src, dst, p, datalen)
  174:     u_int32     src;
  175:     u_int32     dst;
  176:     char        *p;
  177:     int         datalen;
  178: {
  179:     return;
  180: }
  181: 
  182: 
  183: /* TODO */
  184: /*
  185:  * find out which group is involved first of all 
  186:  * then determine if a graft was sent.
  187:  * if no graft sent, ignore the message
  188:  * if graft was sent and the ack is from the right 
  189:  * source, remove the graft timer so that we don't 
  190:  * have send a graft again
  191:  */
  192: void
  193: dvmrp_accept_g_ack(src, dst, p, datalen)
  194:     u_int32     src;
  195:     u_int32     dst;
  196:     char        *p;
  197:     int         datalen;
  198: {
  199:     return;
  200: }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>