summaryrefslogtreecommitdiff
path: root/sysdep/unix/krt-iface.c
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>1999-03-26 21:44:38 +0000
committerMartin Mares <mj@ucw.cz>1999-03-26 21:44:38 +0000
commit7e5f5ffdda7232048c4baf3fdec358afb494a29d (patch)
tree0cbc52ac45785f16175d04039a27aa133b4b2cf2 /sysdep/unix/krt-iface.c
parent739ebd8e82b090ed91b3ebe77509ecd6784eca9a (diff)
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.
Diffstat (limited to 'sysdep/unix/krt-iface.c')
-rw-r--r--sysdep/unix/krt-iface.c24
1 files changed, 13 insertions, 11 deletions
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");
}