HP-UX Reference (11i v2 03/08) - 4 File Formats (vol 8)
g
gated.conf(4) gated.conf(4)
GateD reads re-reads this list every 15 second looking for changes. When the routing socket is in use, it
also re-reads it whenever a messages is received indicating a change in routing configuration. Receipt of
a SIGUSR2 signal also causes GateD to re-read the list. This interval may be explicitly configured in the
interface configuration.
Reading the interface list with sysctl
BSD 4.4 added the ability to read the kernel interface list via the sysctl system call. The interface status
is returned atomically as a list of routing socket messages which GateD parses for the required informa-
tion.
BSD 4.4 also added routing socket messages to report interface status changes immediately. This allows
GateD to react quickly to changes in interface configuration.
When this method is in use, GateD re-reads the interface list only once a minute. It also re-reads it on
routing table changes indications and when a SIGUSR2 is received. This interval may be explicitly
configured in the interface configuration.
Reading interface physical addresses
Later version of the getkerninfo() and sysctl() interfaces return the interface physical addresses
as part of the interface information. On most systems where this information is not returned, GateD
scans the kernel physical interface list for this information for interfaces with
IFF_BROADCAST
set,
assuming that their drivers are handled the same as Ethernet drivers. On some systems, such as SunOS
4 and SunOS 5, system specific interfaces are used to learn this information
The interface physical addresses are useful for IS-IS, for IP protocols, they are not currently used, but
may be in the future.
Reading kernel variables
At startup, GateD reads some special variables out of the kernel. This is usually done with the nlist (or
kvm_nlist) system call, but some systems use different methods.
The variables read include the status of UDP checksum creation and generation, IP forwarding and ker-
nel version (for informational purposes). On systems where the routing table is read directly from kernel
memory, the root of the hash table or radix tree routing table is read. On systems where interface physi-
cal addresses are not supplied by other means, the root of the interface list is read.
Special route flags
The later BSD based kernel support the special route flags described here.
RTF_REJECT
Instead of forwarding a packet like a normal route, routes with RTF_REJECT cause packets to
be dropped and unreachable messages to be sent to the packet originators. This flag is only
valid on routes pointing at the loopback interface.
RTF_BLACKHOLE
Like the RTF_REJECT flag, routes with RTF_BLACKHOLE cause packets to be dropped, but
unreachable messages are not sent. This flag is only valid on routes pointing at the loopback
interface.
RTF_STATIC
When GateD starts, it reads all the routes currently in the kernel forwarding table. Besides
interface routes, it usually marks everything else as a remnant from a previous run of GateD
and deletes it after a few minutes. This means that routes added with the route command will
not be retained after GateD has started.
To fix this the RTF_STATIC flag was added. When the route command is used to install a
route that is not an interface route it sets the RTF_STATIC flag. This signals to GateD that
said route was added by the systems administrator and should be retained.
Kernel Configuration
kernel {
options
[ nochange ]
[ noflushatexit ]
[ remnantholdtime time ]
;
routes number ;
Section 4−−114 Hewlett-Packard Company − 38 − HP-UX 11i Version 2: August 2003