#
# Public Release 3
#
# $Id: gated-2.0-impl.txt,v 1.3 1999/02/17 23:25:30 cwr Exp $
#
# ------------------------------------------------------------------------
#
# Copyright (c) 1996,1997,1998,1999 The Regents of the University of Michigan
# All Rights Reserved
#
# Royalty-free licenses to redistribute GateD Release
# 3 in whole or in part may be obtained by writing to:
#
# Merit GateDaemon Project
# 4251 Plymouth Road, Suite C
# Ann Arbor, MI 48105
#
# THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
# EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE REGENTS OF THE
# UNIVERSITY OF MICHIGAN AND MERIT DO NOT WARRANT THAT THE
# FUNCTIONS CONTAINED IN THE SOFTWARE WILL MEET LICENSEE'S REQUIREMENTS OR
# THAT OPERATION WILL BE UNINTERRUPTED OR ERROR FREE. The Regents of the
# University of Michigan and Merit shall not be liable for
# any special, indirect, incidental or consequential damages with respect
# to any claim by Licensee or any third party arising from use of the
# software. GateDaemon was originated and developed through release 3.0
# by Cornell University and its collaborators.
#
# Please forward bug fixes, enhancements and questions to the
# gated mailing list: [email protected].
#
# ------------------------------------------------------------------------
#
# Copyright (c) 1990,1991,1992,1993,1994,1995 by Cornell University.
# All rights reserved.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
# LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS FOR A PARTICULAR PURPOSE.
#
# GateD is based on Kirton's EGP, UC Berkeley's routing
# daemon (routed), and DCN's HELLO routing Protocol.
# Development of GateD has been supported in part by the
# National Science Foundation.
#
# ------------------------------------------------------------------------
#
# Portions of this software may fall under the following
# copyrights:
#
# Copyright (c) 1988 Regents of the University of California.
# All rights reserved.
#
# Redistribution and use in source and binary forms are
# permitted provided that the above copyright notice and
# this paragraph are duplicated in all such forms and that
# any documentation, advertising materials, and other
# materials related to such distribution and use
# acknowledge that the software was developed by the
# University of California, Berkeley. The name of the
# University may not be used to endorse or promote
# products derived from this software without specific
# prior written permission. THIS SOFTWARE IS PROVIDED
# ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
Overview
Gated provides a single-threaded event driven enviornment for
implementing routing protocols. Events are generated by sockets being
ready for read, write or exceptions, interval timer expiration and
signals requesting re-configuration and shutdown. Threads are
non-interruptable and therefore must take steps to avoid excessive
processing time when possible.
Implementing ISO in gated
Most of the support routines (tracing, tasks and timers) are
relatively protocol independent. The major areas needing changes are
the interface code, routing table and the parser.
Socket addresses are already supported as a typedef sockaddr_un which
is a union of all relevent address family socket types. The tracing
code prints sockaddr's by pointer selecting on protocol family.
The interface code must be updated to obtain the necessary information
about ISO interfaces from the kernel. The interface support routines
will need to be updated to locate interfaces with in the ISO address
family and the if_rt* routines will need to be updated to support the
ISO address family.
The routing table is currently set up as a hash table. [I'd like to
convert to Patricia, but like everyone else I'm waiting for Van.] I
don't know enough about ISO addresses to know if this method can be
extended to ISO or not. Various AF_INET dependencies need to be
generalized to support AF_ISO at various places in the ISO code. The
actual ISO routing table should probably be seperate from the AF_INET
one.
The parser will be the most complicated. The parser will need to be
updated to recognize ISO addresses. Various support code in the
parser will have to be expanded to support additional address
families. The current protocols will need to be updated to reject
non-AF_INET addresses. The route control code will need to be updated
to prevent missing of address families.
Tracing
All logging and tracing is done by two routines. Tracing is usually
done to a file, but may be done to stdout depending on how gated is
started. Stdout and stderr are normally closed so printf() should not
be used.
Tracing is currently controlled by a global flag set from the
configuration file specifying the levels of tracing. [This will
hopefully be re-written to provide task specific tracing flags in the
future, allowing tracing of packets from one peer and not the others,
for example]
tracef(fmt, args....)
tracef(level, priority, fmt, args...)
Tracing is done on a line-by-line basis, newlines should not be
included in the config file because of the use of timestamps.
Timestamps may be disabled for an individual line by including
TR_NOSTAMP in the level.
Both trace() and tracef() use the fmt and args format of print() with
the following additions:
%A Expects a pointer to a sockaddr and formats the
address for the specified family. Currently only
AF_INET is defined. If the # modifier is specified,
the port number is appended to the address.
%m Inserts the text associatted with the current value of
errno.
%T Prints the passed time_t value time in hh:mm:ss
format. Currently does not support the date or a
number of days.
The trace buffer is filled by tracef() calls. A trace() call fills
the buffer and specifies the disposition. If any of the logging level
flags specified on the trace() call match those specified in the
configuration file, the line is logged to the trace file. If the
specified priority is non-zero, the message is also syslogged with the
specified priority. The buffer is then cleared. If trace() is called
with a fmt of NULL, no data is appended before logging.
The logging file is specified on the command line or in the
configuration file.
Tasks
A TASK is generally associated with a socket, but may be around just
to co-ordinate timers, or for cleanup for reparsing.
The fields task_socket and task_timer should not be modified directly.
Task routines are called with:
task_routine(task *tp)
A is created by first allocating task structure by calling task_alloc:
task *task_alloc(char *name);
The applicable fields should then be filled in followed by a call to
task_create:
int task_create(task *tp, int maxpacket)
Task_create returns TRUE or FALSE, if FALSE, an immediate quit(EINVAL)
is in order. Maxpacket is the specification of the largest packet
size to be received. This allows a common receive buffer to be shared
amoung all protocols.
A task is deleted by calling task_delete which will delete all timers
associated with this task, close the socket and finally delete the
task:
void task_delete(task *tp);
If a socket has been opened before a task has been created,
task_socket should be set before calling task_create. If it is opened
after task creation, task_set_socket() should be used it indicate the
association. Existing sockets should be disassociated with task first
by calling task_reset_socket() after closing the socket.
void task_set_socket(task *tp, int socket);
void task_reset_socket(task *tp);
When printing the task name, task_name() should be used which appends
the address (if non-zero)
没有合适的资源?快使用搜索试试~ 我知道了~
gated-3-5-11.rar_GateD download _linux gated_linux rip_linux支持os
共472个文件
c:140个
html:82个
h:66个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 195 浏览量
2022-09-14
14:34:22
上传
评论
收藏 2.05MB RAR 举报
温馨提示
unix/linux下的路由守护程序,支持OSPF、RIP、BGP等,并支持多协议之间路由交互,目前已经被nexthop所收购
资源推荐
资源详情
资源评论
收起资源包目录
gated-3-5-11.rar_GateD download _linux gated_linux rip_linux支持os (472个子文件)
merit.license.v_3.0 16KB
bsdi-bsd.os-2.0 1KB
merit.bsdi.2.0 1KB
merit.bsdi.3.0 1KB
irix-5.0 1KB
linux-2.0 1KB
sunos5.0 998B
bsdi-bsd.386-1.0 975B
CHANGES.1 111KB
netstar.bsdi.2.1 2KB
merit.bsdi.2.1 1KB
merit.bsdi.2.0.1 1KB
bsdi-bsd.386-1.1 1KB
dec-ultrix-3.1 832B
dec-ultrix-4.1 709B
sunos-4.1.1-gcc 1KB
merit.BSD.OS-2.1-i386 1KB
ibm-aix-3.2 958B
irix-5.2 958B
dec-ultrix-4.2 831B
sunos-5.3 1KB
bsd-4.3 1KB
bsd-4.3reno 1KB
bsd-4.3reno-rt 908B
ibm-4.3rt 844B
ibm-4.3rt-gcc 1KB
irix-6.4 2KB
merit.SunOS-4.1.4 1KB
merit.SunOS-4.1.4-snmp 1KB
merit.SunOS-5.5 2KB
merit.hp.9.5 869B
merit.SunOS-5.5-snmp 2KB
merit.SunOS-5.6 1KB
merit.SunOS-5.6-snmp 2KB
merit.hpux-9.05-9000.715 1KB
hpux-9.1-9000.720 842B
hpux-8.7-9000.720 796B
gdc.8 15KB
ospf_monitor.8 10KB
gated.8 10KB
ripquery.8 7KB
hpux-8.0-9000.835 856B
Acknowledgements 4KB
albert 928B
apache 1KB
archtype 4KB
config.awk 15KB
config.files.awk 7KB
sigconv.awk 4KB
version.awk 4KB
azilda 1KB
README.bgp 14KB
bgp-ospf 2KB
birddog 996B
blackbird 1013B
boa 828B
BUGS 18KB
mkdep.build 8KB
bgp_rt.c 248KB
isis_mib.c 163KB
task.c 153KB
bgp_init.c 139KB
dvmrp.c 112KB
slsp_db.c 103KB
isis_mib_tables.c 98KB
pim.c 97KB
krt.c 95KB
aspath.c 92KB
rip.c 89KB
isis_lsp.c 81KB
ospf_mib.c 81KB
egp.c 72KB
rt_table.c 70KB
ospf_init.c 69KB
if.c 69KB
slsp_nbr.c 67KB
bgp_sync.c 65KB
rdisc.c 65KB
bgp.c 63KB
policy.c 61KB
isis_spf.c 61KB
parse.c 57KB
slsp_io.c 53KB
isis_main.c 52KB
hello.c 51KB
inet.c 48KB
ospf_build_ls.c 44KB
igmp.c 44KB
rt_radix.c 44KB
gdc.c 43KB
asmatch.c 42KB
ospf_rt.c 40KB
krt_rt_sock.c 40KB
ospf_spf.c 40KB
rt_static.c 37KB
isis_flood.c 37KB
egp_rt.c 35KB
ospf_rxpkt.c 34KB
inet_multi.c 32KB
ospf_rxmon.c 32KB
共 472 条
- 1
- 2
- 3
- 4
- 5
资源评论
APei
- 粉丝: 64
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功