Commit graph

18 commits

Author SHA1 Message Date
Ondrej Zajicek eac21b46f7 This is bug, isn't it? 2008-11-21 13:01:05 +01:00
Martin Mares 057021df0d Fix behavior of ipa_opposite().
It was giving wrong results on /30 networks.
2008-08-25 11:19:49 +00:00
Ondrej Filip b1a1fabac7 *BSD port added. (Tested on FreeBSD and NetBSD) 2004-05-31 13:25:00 +00:00
Martin Mares 4a91150175 Updated for new scope handling.
Also, provide proper address scopes in struct ifa.
2000-06-01 12:58:41 +00:00
Martin Mares 221135d6bf Include "lib/string.h" instead of <string.h>. It should give us bzero()
and other non-portable functions on all systems.
2000-03-31 23:30:21 +00:00
Martin Mares a92bebe0ec Yet another LOCAL_DEBUG turned off. 2000-03-12 21:58:51 +00:00
Martin Mares 6a636392d3 Rewrote interface type detection logic. The `unnumbered' flag is now per
address, not per interface (hence it's ifa->flags & IA_UNNUMBERED) and
should be set reliably. IF_MULTIACCESS should be fixed now, but it isn't
wise to rely on it on interfaces configured with /30 prefix.
2000-02-29 23:19:52 +00:00
Martin Mares 476e108425 Minor cleanups. 1999-12-16 13:51:43 +00:00
Martin Mares e693ddff87 Handle cases when SIOCGIFINDEX is defined, but doesn't work (new glibc
with 2.0 kernels).
1999-12-16 13:23:32 +00:00
Martin Mares 67ece6df42 Tried to clean up multicast handling. Now we don't try to guess
multicast abilities depending on definedness of symbols and use hard-wired
system-dependent configuration defines instead.

Please test whereever you can.
1999-12-16 13:06:13 +00:00
Martin Mares 7de45ba4a0 Kernel route syncer supports multiple tables.
The changes are just too extensive for lazy me to list them
there, but see the comment at the top of sysdep/unix/krt.c.
The code got a bit more ifdeffy than I'd like, though.

Also fixed a bunch of FIXME's and added a couple of others. :)
1999-08-03 19:33:22 +00:00
Martin Mares 9273035403 Changes to interface handling on traditional Unices:
o  Aliases are interpreted as secondary addresses.
  o  When the system doesn't supply interface indices, generate
     our ones.
1999-08-03 19:30:20 +00:00
Martin Mares 9a158361da I rewrote the interface handling code, so that it supports multiple
addresses per interface (needed for example for IPv6 support).

Visible changes:

o  struct iface now contains a list of all interface addresses (represented
   by struct ifa), iface->addr points to the primary address (if any).
o  Interface has IF_UP set iff it's up and it has a primary address.
o  IF_UP is now independent on IF_IGNORED (i.e., you need to test IF_IGNORED
   in the protocols; I've added this, but please check).
o  The if_notify_change hook has been simplified (only one interface pointer
   etc.).
o  Introduced a ifa_notify_change hook. (For now, only the Direct protocol
   does use it -- it's wise to just listen to device routes in all other
   protocols.)
o  Removed IF_CHANGE_FLAGS notifier flag (it was meaningless anyway).
o  Updated all the code except netlink (I'll look at it tomorrow) to match
   the new semantics (please look at your code to ensure I did it right).

Things to fix:

o  Netlink.
o  Make krt-iface interpret "eth0:1"-type aliases as secondary addresses.
1999-05-06 21:38:11 +00:00
Martin Mares 01bd7759b2 Ignore alias interfaces (some day, we will treat them as pure secondary
interface addresses).
1999-04-12 18:07:05 +00:00
Martin Mares 49ed70b48e Portability fixes. 1999-04-07 14:25:56 +00:00
Martin Mares fe662dfd78 Fixed `too many interfaces' cases. 1999-04-02 13:38:54 +00:00
Martin Mares 7e5f5ffdda 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.
1999-03-26 21:44:38 +00:00
Martin Mares 2d14045224 Rewrote the kernel syncer. The old layering was horrible.
The new kernel syncer is cleanly split between generic UNIX module
and OS dependent submodules:

  -  krt.c (the generic part)
  -  krt-iface (low-level functions for interface handling)
  -  krt-scan (low-level functions for routing table scanning)
  -  krt-set (low-level functions for setting of kernel routes)

krt-set and krt-iface are common for all BSD-like Unices, krt-scan is heavily
system dependent (most Unices require /dev/kmem parsing, Linux uses /proc),
Netlink substitues all three modules.

We expect each UNIX port supports kernel routing table scanning, kernel
interface table scanning, kernel route manipulation and possibly also
asynchronous event notifications (new route, interface state change;
not implemented yet) and build the KRT protocol on the top of these
primitive operations.
1999-03-03 19:49:56 +00:00
Renamed from sysdep/unix/sync-if.c (Browse further)