⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 netconf.c

📁 wm PNE 3.3 source code, running at more than vxworks6.x version.
💻 C
📖 第 1 页 / 共 5 页
字号:
/* $Header: /usr/cvsroot/target/src/wrn/wm/demo/lib/netconf.c,v 1.2 2001/11/08 15:56:22 tneale Exp $ *//* * Copyright (C) 1999-2005 Wind River Systems, Inc. * All rights reserved.  Provided under license only. * Distribution or other use of this software is only * permitted pursuant to the terms of a license agreement * from Wind River Systems (and is otherwise prohibited). * Refer to that license agreement for terms of use. *//**************************************************************************** *  Copyright 1993-1997 Epilogue Technology Corporation. *  Copyright 1998-1999 Integrated Systems, Inc. *  All rights reserved. ****************************************************************************//* * $Log: netconf.c,v $ * Revision 1.2  2001/11/08 15:56:22  tneale * Updated for newest file layout * * Revision 1.1.1.1  2001/11/05 17:48:41  tneale * Tornado shuffle * * Revision 2.96  2001/01/19 22:23:45  paul * Update copyright. * * Revision 2.95  2000/12/02 20:25:24  sar * Turn on router discovery for ipv6 when useful, and set the loopback flag * * Revision 2.94  2000/03/17 07:13:39  paul * Roll IPv6 back to the last released state. * * Revision 2.93  2000/03/17 00:12:39  meister * Update copyright message * * Revision 2.92  1999/11/05 22:24:08  paul * Eliminate dependence on ancient backward-compatibility code. * * Revision 2.90  1999/09/13 19:44:27  paul * Cast arguments in debugging code to squelch compiler warnings. * * Revision 2.89  1999/08/20 20:37:24  wes * Use new DHCP saved offer API. * * Revision 2.88  1999/08/02 20:17:43  josh * updates to OSPF configuration support in netconfig_ospf() * * Revision 2.87  1999/05/21 17:18:22  sra * Suppress annoying "not configured" messages unless user really wants them. * * Revision 2.86  1999/04/02 22:13:02  wes * Add support for setting the DHCP vendor class in outbound packets * * Revision 2.85  1999/02/18 04:41:34  wes * Sockets merge: Everything Else *  - memory pools *  - thread support *  - port-specific headers * * Revision 2.84  1999/01/28 18:46:40  josh * lots of updates to OSPF support code * * Revision 2.83  1998/12/16 15:52:35  josh * replace an obviously wrong virtual link configuration with a * somewhat less wrong (but not entirely correct) attempt at same * * Revision 2.82  1998/12/08 15:48:20  josh * fixing a configuration bug in the OSPF and RIP code that could * cause a core dump * * Revision 2.81  1998/12/02 17:27:13  josh * updates to functionality for Courier, particularly OSPF * * Revision 2.80  1998/10/28 18:50:58  josh * marging in courier-sep98 branch * * Revision 2.79.2.1  1998/10/28 22:47:25  niqbal * Placed parts of the code under the INSTALL_ATTACHE_DNS directive * so that the code links without DNS. * * Revision 2.79  1998/09/08 05:21:47  sra * Compiler warnings. * * Revision 2.78.4.2  1998/09/11 18:53:48  sra * Second batch of updates from Josh and Shukri. * * Revision 2.78.4.1  1998/09/11 05:50:25  sra * Initial commit on courier-sep98 branch. * * Revision 2.78  1998/07/04 00:35:41  sra * Fix a CAD-UL warning. * * Revision 2.77  1998/07/02 16:49:11  wes * Fix restartability of dhcp * * Revision 2.76  1998/07/02 14:54:22  sra * Get rid of bogus strtoul() definition. * * Revision 2.75  1998/07/02 06:55:36  sra * Make Snark restartable under pSOS, and other minor cleanups. * * Revision 2.74  1998/06/11 21:39:01  wes * Keep track of DHCP invocations.. * * Revision 2.73  1998/06/04 21:36:46  josh * netconfig_rip() is a little more flexible now * * Revision 2.72  1998/06/03 21:32:05  sar * Updated code to use common string macros * * Revision 2.71  1998/04/09 22:08:24  wes * Reverse previous commit made in error.. * * Revision 2.70  1998/04/09 22:03:09  wes * Rip out ntohl/ntohs stuff since anyone still running NetBSD 0.8 gets what they deserve... * * Revision 2.69  1998/03/10 13:08:33  mrf * Fix RD_PREF_* constant problem more completely * * Revision 2.68  1998/03/10 01:07:05  meister * Added attache/rd_cache.h to the include files needed if IPV6 is turned on. * I'm not sure if margaret wants to solve this some other way. This * gets rid of the RD_PREF_DEFAULT undefined error on line 1236. * * Revision 2.67  1998/03/07 17:44:12  mrf * Fix typo in function call * * Revision 2.66  1998/03/07 15:37:58  mrf * Use new API for adding default routes. * * Revision 2.65  1998/03/06 17:07:42  mrf * Add preference argument to route-default command, use new API to add * default router. * * Revision 2.64  1998/03/04 21:31:58  mrf * Fix build problem with IPv6 turned off. * * Revision 2.63  1998/03/03 22:33:06  mrf * Fix mis-typed conditional, conditionalize vars used in conditional code * * Revision 2.62  1998/03/03 22:20:59  mrf * Add default router to default router list when RD is installed * * Revision 2.61  1998/02/25 04:57:26  sra * Update copyrights. * * Revision 2.60  1998/02/23 17:56:31  mrf * Fix error in h_address configuration. * * Revision 2.59  1998/02/20 18:26:12  mrf * *** empty log message *** * * Revision 2.58  1998/02/20 02:10:15  mrf * Simplify Router Discovery configuration. * * Revision 2.57  1998/02/13 15:25:15  mrf * Change memory allocation of config info to avoid leak. * * Revision 2.56  1998/02/12 20:27:51  mrf * Configure SNTP client code. * * Revision 2.55  1998/01/22 18:04:33  mrf * Initialize interfaces for IGMP * * Revision 2.54  1997/12/02 16:18:37  mrf * conditionalize variable to eliminate compiler warnings. * * Revision 2.53  1997/11/21 17:03:35  josh * re-merging the code from the previous two revisions.  Oops. * * Revision 2.52  1997/11/21 00:06:23  josh * updating files for Liaison support for NIT * * Revision 2.51  1997/11/20 17:29:28  sra * Minor changes to PPP authentication API. * * Revision 2.50  1997/11/18 03:18:25  sra * Brand new PAP and CHAP code for PPP. * * Revision 2.49  1997/11/04 16:11:31  josh * Adding Liaison support files * * Revision 2.48  1997/10/28 00:51:53  sra * Convert PPP code to use BUG() macro. * Bang on CHAP and PAP code some more. * Create test driver for PPP under Snark/BSD. * * Revision 2.47  1997/10/06 15:25:41  mrf * better configuration for router discovery * * Revision 2.46  1997/10/06 04:13:19  mrf * configure router discovery on non-router host * * Revision 2.45  1997/10/04 21:26:23  mrf * router configuration code for ipv4 router discovery * * Revision 2.44  1997/10/02 22:50:28  mrf * add config variables in etc.ini to set token and token length for interface * * Revision 2.43  1997/06/15 01:46:09  mrf * changed IPADDR_* and related macros to use pointers instead of immediates * as arguments, also changed to GET/SET/PTR forms * * Revision 2.42  1997/06/04 18:14:27  mrf * changed routing macros to GET/SET format and to take pointer args * * Revision 2.41  1997/05/27 15:30:05  mrf * conditionalize ipv6 link-local autoconfiguration via NF_AUTOCONF flag * * Revision 2.40  1997/05/24 22:03:16  sra * Better way of specifying interfaces in etc.ini. * * Revision 2.39  1997/05/23 05:55:56  mrf * changed routing table masks to prefix lengths * * Revision 2.38  1997/05/23 04:16:06  sra * Cosmetic changes. * * Revision 2.37  1997/05/20 02:21:44  mrf * make snark lib driver code use new ldb arp definitions * * Revision 2.36  1997/05/20 02:08:04  mrf * ipaddr_t, ldb macro and routing api conversion of media layer and arp code * * Revision 2.35  1997/05/07 23:08:56  alan * Properly conditionalize some declarations for ipv6. * * Revision 2.34  1997/05/07 18:59:15  mrf * pass buffer to ipaddr_to_string, instead of using dynamic memory * * Revision 2.33  1997/04/25 01:02:29  sra * Fix code to set explicit MAC addresses for BPF, allow non-promiscuous mode. * * Revision 2.32  1997/04/22 19:01:18  josh * fixing a problem introduced in the last revision. * * Revision 2.31  1997/04/19 02:48:00  mrf * added basic ipv6 code, config ipv6 addresses, added new ipv6_send handler * to snoop and bpf driver structures, added configurable maxlnt and cleaned * up makefile.cfg formatting error * * Revision 2.30  1997/03/20 06:52:57  sra * DFARS-safe copyright text.  Zap! * * Revision 2.29  1997/02/25 19:13:52  josh * added code to configure Courier RIP * * Revision 2.28  1997/01/30 20:25:42  josh * courier includes have mostly moved to common * * Revision 2.27  1997/01/29 06:53:58  sra * Switch vapornet to use a media_ctl() function. * * Revision 2.26  1997/01/28 17:59:49  lowell * support for MAC address in initialization file * (I've hacked this up enough times, I might as well check it in) * * Revision 2.25  1997/01/15 04:15:36  sra * Don't initialize the loopback interface code if it's not installed. * * Revision 2.24  1997/01/13 19:21:41  josh * netconfig_ospf() now uses courier_get_ifb() to look up ifbs * * Revision 2.23  1996/11/12 19:41:51  josh * modified configuration stuff to make snark handle new * changes to Courier interface creation * * Revision 2.22  1996/10/30  16:32:03  sra * Another compiler warning. * * Revision 2.21  1996/10/30  06:59:31  sra * Cosmetic changes to fix compiler warnings. * * Revision 2.20  1996/07/15  19:20:39  josh * updated policy management scheme * added support for trap (bgp-only for now) * * Revision 2.19  1996/05/28  16:38:58  josh * New Policy Management scheme for OSPF and BGP router * * Revision 2.18  1996/05/08  18:18:09  lowell * "gratuitous ARP" shouldn't break non-ARP nets now * * Revision 2.17  1996/05/08  18:09:35  josh * compensated for change in BGP API * * Revision 2.16  1996/04/23  22:05:58  lowell * added ARP-for-my-own-address on startup * (to solve problems associated with making up ethernet addresses * out of thin air) * * Revision 2.15  1996/03/22  10:05:39  sra * Update copyrights prior to Attache 3.2 release. * * Revision 2.14  1996/03/19  18:28:21  lowell * removed extra parameter to dhcp_warmstart() * * Revision 2.13  1996/03/14  19:12:58  lowell * DHCP improvements, particularly support for "warmstart" functionality * * Revision 2.12  1996/03/14  18:43:51  sra * Fiddle BGP policies a bit. * * Revision 2.11  1996/03/08  21:55:38  sra * Add ospf-asbr-status to netconfig_ospf(). * * Revision 2.10  1996/02/13  21:06:19  sra * Add a bunch of Courier policy key junk. * * Revision 2.9  1995/11/24  07:33:43  sra * Rework Courier code to support OSPF, BGP, et al. * Cosmetic changes to a lot of other stuff. * * Revision 2.8  1995/11/19  21:55:26  sra * Get rid of net_lookup(), since it did exactly what if_lookup() does. * * Revision 2.7  1995/10/06  21:18:33  lowell * finishing previous fix * * Revision 2.6  1995/10/06  21:07:09  lowell * fixed bug in handling of ini file handle * * Revision 2.5  1995/10/06  17:03:10  lowell * added support for DHCP client ID in config file * * Revision 2.4  1995/10/04  23:44:03  lowell * added DHCP support * * Revision 2.3  1995/09/28  23:08:44  sra * Fix Courier identifiers and copyrights for release packaging. * * Revision 2.2  1995/09/21  18:49:26  sra * Fix compile-time initialization to conform to current theory of how * INSTALL_ATTACHE_RESTARTABLE works. * * Revision 2.1  1995/07/31  13:54:55  sra * OSPF now working well enough to let somebody else test it. * * Revision 2.0  1995/05/10  22:38:15  sra * Attache release 3.0. * * Revision 1.14  1995/04/19  21:13:43  dab * Use add_default_route instead of calling route_create directly * * Revision 1.13  1995/04/15  05:47:54  sra * Shake the bugs out of the RIP filter code. * * Revision 1.12  1995/04/14  20:19:23  dab * Added the ip-address command. * * Revision 1.11  1995/03/26  02:43:08  sra * Set broadcast address correctly. * * Revision 1.10  1995/03/17  22:06:59  dab * changed interface_routes_owner to just static_routes_owner. * * Revision 1.9  1995/01/06  00:52:48  sra * Update copyright notice for 2.1 release. * * Revision 1.8  1994/12/23  15:26:10  dab * Added route-default-net configuration command.  This lets you set * a default route through an interface that isn't up yet.  Changing * route_find to route_lookup wouldn't have worked because the route * isn't insatlled until the interface comes up. * * Revision 1.7  1994/09/04  06:13:38  sra * Clean up antique type names and install macros. * * Revision 1.6  1993/08/05  20:11:20  sra * Add comment talking about route_find() vs. route_lookup(). * * Revision 1.5  1993/08/03  01:42:14  sra * Add still more casts for MSC 7.0 * * Revision 1.4  1993/08/03  01:29:27  sra * Add a few casts for MSC 7.0. * * Revision 1.3  1993/07/31  00:54:21  sra * Add a few casts for Borland C++ 3.1. * * Revision 1.2  1993/07/30  23:45:16  sra * Cosmetic changes to make Borland C++ 3.1 happy. * * Revision 1.1  1993/07/05  21:53:30  sra * Initial revision * *//* [clearcase]modification history-------------------01a,19apr05,job  update copyright notices*//* * Interface configuration routines for snark. */#include <stdio.h>#include <stdlib.h>#include <wrn/wm/attache/config.h>#include <wrn/wm/attache/mib.h>#include <wrn/wm/attache/timer.h>#include <wrn/wm/attache/packet.h>#include <wrn/wm/attache/net.h>#include <wrn/wm/attache/route.h>#include <wrn/wm/attache/ip.h>#include <wrn/wm/attache/udp.h>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -