From 7e5f5ffdda7232048c4baf3fdec358afb494a29d Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Fri, 26 Mar 1999 21:44:38 +0000 Subject: Moved to a much more systematic way of configuring kernel protocols. o Nothing is configured automatically. You _need_ to specify the kernel syncer in config file in order to get it started. o Syncing has been split to route syncer (protocol "Kernel") and interface syncer (protocol "Device"), device routes are generated by protocol "Direct" (now can exist in multiple instances, so that it will be possible to feed different device routes to different routing tables once multiple tables get supported). See doc/bird.conf.example for a living example of these shiny features. --- sysdep/unix/krt-iface.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'sysdep/unix/krt-iface.c') diff --git a/sysdep/unix/krt-iface.c b/sysdep/unix/krt-iface.c index 3b665a44..63035588 100644 --- a/sysdep/unix/krt-iface.c +++ b/sysdep/unix/krt-iface.c @@ -131,7 +131,7 @@ scan_ifs(struct ifreq *r, int cnt) } void -krt_if_scan(struct krt_proto *p) +krt_if_scan(struct kif_proto *p) { struct ifconf ic; static int last_ifbuf_size = 4*sizeof(struct ifreq); @@ -172,23 +172,25 @@ krt_if_scan(struct krt_proto *p) } void -krt_if_preconfig(struct krt_config *c) +krt_if_preconfig(struct kif_config *c) { } void -krt_if_start(struct krt_proto *p) +krt_if_start(struct kif_proto *p) +{ +} + +void +krt_if_shutdown(struct kif_proto *p) { - if (if_scan_sock < 0) - { - if_scan_sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_IP); - DBG("Using socket %d for interface and route scanning\n", if_scan_sock); - if (if_scan_sock < 0) - die("Cannot create scanning socket: %m"); - } } void -krt_if_shutdown(struct krt_proto *p) +krt_if_io_init(void) { + if_scan_sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_IP); + DBG("Using socket %d for interface and route scanning\n", if_scan_sock); + if (if_scan_sock < 0) + die("Cannot create scanning socket: %m"); } -- cgit v1.2.3