Annotation of embedaddon/pimd/dvmrp_proto.c, revision 1.1

1.1     ! misho       1: /*
        !             2:  * Copyright (c) 1998-2001
        !             3:  * University of Southern California/Information Sciences Institute.
        !             4:  * All rights reserved.
        !             5:  *
        !             6:  * Redistribution and use in source and binary forms, with or without
        !             7:  * modification, are permitted provided that the following conditions
        !             8:  * are met:
        !             9:  * 1. Redistributions of source code must retain the above copyright
        !            10:  *    notice, this list of conditions and the following disclaimer.
        !            11:  * 2. Redistributions in binary form must reproduce the above copyright
        !            12:  *    notice, this list of conditions and the following disclaimer in the
        !            13:  *    documentation and/or other materials provided with the distribution.
        !            14:  * 3. Neither the name of the project nor the names of its contributors
        !            15:  *    may be used to endorse or promote products derived from this software
        !            16:  *    without specific prior written permission.
        !            17:  *
        !            18:  * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
        !            19:  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        !            20:  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
        !            21:  * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
        !            22:  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        !            23:  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
        !            24:  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
        !            25:  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
        !            26:  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
        !            27:  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
        !            28:  * SUCH DAMAGE.
        !            29:  */
        !            30: /*
        !            31:  *  $Id: dvmrp_proto.c,v 1.10 2001/09/10 20:31:36 pavlin Exp $
        !            32:  */
        !            33: 
        !            34: 
        !            35: #include "defs.h"
        !            36: 
        !            37: 
        !            38: /* TODO */
        !            39: /*
        !            40:  * Process an incoming neighbor probe message.
        !            41:  */
        !            42: void
        !            43: dvmrp_accept_probe(src, dst, p, datalen, level)
        !            44:     uint32_t src __attribute__((unused));
        !            45:     uint32_t dst __attribute__((unused));
        !            46:     uint8_t *p __attribute__((unused));
        !            47:     int datalen __attribute__((unused));
        !            48:     uint32_t level __attribute__((unused));
        !            49: {
        !            50:     return;
        !            51: }
        !            52: 
        !            53: 
        !            54: /* TODO */
        !            55: /*
        !            56:  * Process an incoming route report message.
        !            57:  */
        !            58: void
        !            59: dvmrp_accept_report(src, dst, p, datalen, level)
        !            60:     uint32_t src __attribute__((unused));
        !            61:     uint32_t dst __attribute__((unused));
        !            62:     uint8_t *p __attribute__((unused));
        !            63:     int datalen __attribute__((unused));
        !            64:     uint32_t level __attribute__((unused));
        !            65: {
        !            66:     return;
        !            67: }
        !            68: 
        !            69: 
        !            70: /* TODO */
        !            71: void
        !            72: dvmrp_accept_info_request(src, dst, p, datalen)
        !            73:     uint32_t src __attribute__((unused));
        !            74:     uint32_t dst __attribute__((unused));
        !            75:     uint8_t *p __attribute__((unused));
        !            76:     int datalen __attribute__((unused));
        !            77: {
        !            78:     return;
        !            79: }
        !            80: 
        !            81: 
        !            82: /*
        !            83:  * Process an incoming info reply message.
        !            84:  */
        !            85: void
        !            86: dvmrp_accept_info_reply(src, dst, p, datalen)
        !            87:     uint32_t src;
        !            88:     uint32_t dst;
        !            89:     uint8_t *p __attribute__((unused));
        !            90:     int datalen __attribute__((unused));
        !            91: {
        !            92:     IF_DEBUG(DEBUG_PKT)
        !            93:         logit(LOG_DEBUG, 0, "ignoring spurious DVMRP info reply from %s to %s",
        !            94:               inet_fmt(src, s1, sizeof(s1)), inet_fmt(dst, s2, sizeof(s2)));
        !            95: }
        !            96: 
        !            97: 
        !            98: /*
        !            99:  * Process an incoming neighbor-list message.
        !           100:  */
        !           101: void
        !           102: dvmrp_accept_neighbors(src, dst, p, datalen, level)
        !           103:     uint32_t src;
        !           104:     uint32_t dst;
        !           105:     uint8_t *p __attribute__((unused));
        !           106:     int datalen __attribute__((unused));
        !           107:     uint32_t level __attribute__((unused));
        !           108: {
        !           109:     logit(LOG_INFO, 0, "ignoring spurious DVMRP neighbor list from %s to %s",
        !           110:           inet_fmt(src, s1, sizeof(s1)), inet_fmt(dst, s2, sizeof(s2)));
        !           111: }
        !           112: 
        !           113: 
        !           114: /*
        !           115:  * Process an incoming neighbor-list message.
        !           116:  */
        !           117: void
        !           118: dvmrp_accept_neighbors2(src, dst, p, datalen, level)
        !           119:     uint32_t src;
        !           120:     uint32_t dst;
        !           121:     uint8_t *p __attribute__((unused));
        !           122:     int datalen __attribute__((unused));
        !           123:     uint32_t level __attribute__((unused));
        !           124: {
        !           125:     IF_DEBUG(DEBUG_PKT)
        !           126:         logit(LOG_DEBUG, 0,
        !           127:               "ignoring spurious DVMRP neighbor list2 from %s to %s",
        !           128:               inet_fmt(src, s1, sizeof(s1)), inet_fmt(dst, s2, sizeof(s2)));
        !           129: }
        !           130: 
        !           131: 
        !           132: /* TODO */
        !           133: /*
        !           134:  * Takes the prune message received and then strips it to
        !           135:  * determine the (src, grp) pair to be pruned.
        !           136:  *
        !           137:  * Adds the router to the (src, grp) entry then.
        !           138:  *
        !           139:  * Determines if further packets have to be sent down that vif
        !           140:  *
        !           141:  * Determines if a corresponding prune message has to be generated
        !           142:  */
        !           143: void
        !           144: dvmrp_accept_prune(src, dst, p, datalen)
        !           145:     uint32_t src __attribute__((unused));
        !           146:     uint32_t dst __attribute__((unused));
        !           147:     uint8_t *p __attribute__((unused));
        !           148:     int datalen __attribute__((unused));
        !           149: {
        !           150:     return;
        !           151: }
        !           152: 
        !           153: 
        !           154: /* TODO */
        !           155: /* determine the multicast group and src
        !           156:  *
        !           157:  * if it does, then determine if a prune was sent
        !           158:  * upstream.
        !           159:  * if prune sent upstream, send graft upstream and send
        !           160:  * ack downstream.
        !           161:  *
        !           162:  * if no prune sent upstream, change the forwarding bit
        !           163:  * for this interface and send ack downstream.
        !           164:  *
        !           165:  * if no entry exists for this group send ack downstream.
        !           166:  */
        !           167: void
        !           168: dvmrp_accept_graft(src, dst, p, datalen)
        !           169:     uint32_t     src __attribute__((unused));
        !           170:     uint32_t     dst __attribute__((unused));
        !           171:     uint8_t     *p __attribute__((unused));
        !           172:     int         datalen __attribute__((unused));
        !           173: {
        !           174:     return;
        !           175: }
        !           176: 
        !           177: 
        !           178: /* TODO */
        !           179: /*
        !           180:  * find out which group is involved first of all
        !           181:  * then determine if a graft was sent.
        !           182:  * if no graft sent, ignore the message
        !           183:  * if graft was sent and the ack is from the right
        !           184:  * source, remove the graft timer so that we don't
        !           185:  * have send a graft again
        !           186:  */
        !           187: void
        !           188: dvmrp_accept_g_ack(src, dst, p, datalen)
        !           189:     uint32_t     src __attribute__((unused));
        !           190:     uint32_t     dst __attribute__((unused));
        !           191:     uint8_t     *p __attribute__((unused));
        !           192:     int         datalen __attribute__((unused));
        !           193: {
        !           194:     return;
        !           195: }
        !           196: 
        !           197: /**
        !           198:  * Local Variables:
        !           199:  *  version-control: t
        !           200:  *  indent-tabs-mode: t
        !           201:  *  c-file-style: "ellemtel"
        !           202:  *  c-basic-offset: 4
        !           203:  * End:
        !           204:  */

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