History log of /openbsd-current/usr.sbin/ospf6d/ospfe.h
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.26 18-May-2024 jsg

remove prototypes with no matching function; ok claudio@


Revision tags: OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE OPENBSD_7_3_BASE OPENBSD_7_4_BASE OPENBSD_7_5_BASE
# 1.25 19-Jan-2021 claudio

Like in ospfd use a static pkt_ptr buffer.


# 1.24 19-Jan-2021 claudio

Do the same control cleanup as in ospfd. Move control_state and ctl_conns
into control.c nothing outside needs access to this.


Revision tags: OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.23 02-Jan-2020 denis

Rename orig_rtr_lsa_area() to orig_rtr_lsa()

Now that area is part of iface, original orig_rtr_lsa() is useless. Also
verifying that area != NULL is not needed in some cases (these are
leftovers of the previous diff).

OK remi@


# 1.22 28-Dec-2019 denis

Refactor link state ack/req.

OK remi@


# 1.21 22-Dec-2019 denis

Scale send buffer on socket.

OK remi@


# 1.20 11-Dec-2019 denis

Convert sendto() to sendmsg().

This makes code similar to ospfd(8).

OK claudio@ deraadt@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE
# 1.19 25-Oct-2014 lteo

Remove unnecessary netinet/in_systm.h include.

ok millert@


Revision tags: OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.18 25-Mar-2013 markus

sync w/ospfd: improve snapshot handling; ok claudio, sthen


Revision tags: OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
# 1.17 22-Aug-2010 bluhm

Origin network-LSA with options based on the options of the link-LSAs.
Without this fix Cisco's OSPF 6 ignores our network-LSAs.
ok claudio@


Revision tags: OPENBSD_4_8_BASE
# 1.16 26-May-2010 nicm

Rename some imsg bits to make namespace collisions less likely buf to
ibuf, buf_read to ibuf_read, READ_BUF_SIZE to IBUF_READ_SIZE.

ok henning gilles claudio jacekm deraadt


Revision tags: OPENBSD_4_6_BASE OPENBSD_4_7_BASE
# 1.15 29-Mar-2009 stsp

For SPF calculation, we will need the source address specified
in hello packets by next-hop neighbours. So when notifying the
RDE of a new neighbour, send the source address, too.

ok claudio@


Revision tags: OPENBSD_4_5_BASE
# 1.14 19-Feb-2009 stsp

Remove origination of Intra-Area-Prefix LSAs from ospfe.
Will soon be done in rde instead.

"Sure but don't wait too long before readding the code in rde" claudio@


# 1.13 29-Jan-2009 stsp

Originate Intra-Area-Prefix LSAs which reference a router LSA.
Routers can now advertise prefixes with global scope throughout
an area. This paves the way towards doing SPF calculations to
generate routing tables for a single area.
ok claudio@


# 1.12 27-Jan-2009 stsp

Propagate the neighbour's interface ID, as received in hello packets,
to the RDE.
ok claudio@


# 1.11 30-Dec-2008 claudio

First try at originating Link (type-8) LSA. Code is wrong and the initial
LSA is lost in lsa_flood. Put this in because it goes in the right direction
and ospf6d is work in progress. Add necessary framework so that we can print
Link LSA in ospf6ctl.
Diff mostly from stsp@ ospf6ctl part by myself


# 1.10 28-Dec-2008 claudio

Send the interface index in the correct byte order and add iface_id to
struct nbr to identify the neighbors correclty.
From Stefan Sperling stsp (at) stsp.name


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.9 13-Dec-2007 claudio

Monster commit of stuff I did mostly last month. What it does:
* removes kif and uses iface for everything interface related.
This removes unneeded data redundancy which makes the code more complex.
* adds the link local prefix to struct iface and attaches a list with
the other prefixes to the struct iface. This is needed to generate the
link LSA.
* disconnects struct iface from struct area (the backpointer is gone)
this will make the reload code a bit easier.
norby@ agrees with the direction we're heading with this


# 1.8 13-Oct-2007 claudio

From ospfd: Funny typo, it is fib not fip so adjust function name.


# 1.7 11-Oct-2007 claudio

In OSPFv3 auth crypt is no longer (actually all the auth code is gone) so
kill crypt_seq_num as well.


# 1.6 11-Oct-2007 claudio

area_ospf_options() should return the options in network byte order.


# 1.5 11-Oct-2007 claudio

From ospfd:
Do not overload nbr->options with the dd exchange bits. nbr->options is used
by the hello protocol. Instead add a dd_more flag that is used together with
(the renamed) dd_master flag.


# 1.4 10-Oct-2007 claudio

send_packet() now takes a struct in6_addr as destination instead of a
struct sockaddr_in6 and builds the struct sockaddr_in6 internaly adding scope
if necessary. While there switch to sendto() we don't need any of the sendmsg()
features here.
OK norby@


# 1.3 09-Oct-2007 claudio

Remaining bit of last night work. Make packet reception use all the goodies
introduced (checksumming is no longer needed, no IP header checking is needed,
get a in6_pktinfo with the ifindex and dest addr, cleanup and remove a lot
of other code). With this ospf6d is able to send and receive first hello
packets. OK norby@


# 1.2 09-Oct-2007 claudio

Instead of IP_RECVIF we use IPV6_RECVPKTINFO to get the ifindex and the
destination address of incomming packets. This also removes the need for
IP_HDRINCL. Additionally use IPV6_CHECKSUM to let the kernel do the
necessary packet checksumming, way easier than doing it in userland.
OK norby@


# 1.1 08-Oct-2007 norby

Welcome ospf6d

The new ospf6d daemon will support OSPFv3, basically OSPF for IPv6 networks.

It is heavily based on ospfd(8), it is more or less a copy and paste of it.
Currently some unneeded stuff has been removed and the trasition from
IPv4 to IPv6 has begun.

ospf6d is not very usefull at the moment, it is being imported to allow more
people to work on it concurrently.

Not yet connected to the builds.

ok claudio@ dlg@


# 1.25 19-Jan-2021 claudio

Like in ospfd use a static pkt_ptr buffer.


# 1.24 19-Jan-2021 claudio

Do the same control cleanup as in ospfd. Move control_state and ctl_conns
into control.c nothing outside needs access to this.


Revision tags: OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.23 02-Jan-2020 denis

Rename orig_rtr_lsa_area() to orig_rtr_lsa()

Now that area is part of iface, original orig_rtr_lsa() is useless. Also
verifying that area != NULL is not needed in some cases (these are
leftovers of the previous diff).

OK remi@


# 1.22 28-Dec-2019 denis

Refactor link state ack/req.

OK remi@


# 1.21 22-Dec-2019 denis

Scale send buffer on socket.

OK remi@


# 1.20 11-Dec-2019 denis

Convert sendto() to sendmsg().

This makes code similar to ospfd(8).

OK claudio@ deraadt@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE
# 1.19 25-Oct-2014 lteo

Remove unnecessary netinet/in_systm.h include.

ok millert@


Revision tags: OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.18 25-Mar-2013 markus

sync w/ospfd: improve snapshot handling; ok claudio, sthen


Revision tags: OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
# 1.17 22-Aug-2010 bluhm

Origin network-LSA with options based on the options of the link-LSAs.
Without this fix Cisco's OSPF 6 ignores our network-LSAs.
ok claudio@


Revision tags: OPENBSD_4_8_BASE
# 1.16 26-May-2010 nicm

Rename some imsg bits to make namespace collisions less likely buf to
ibuf, buf_read to ibuf_read, READ_BUF_SIZE to IBUF_READ_SIZE.

ok henning gilles claudio jacekm deraadt


Revision tags: OPENBSD_4_6_BASE OPENBSD_4_7_BASE
# 1.15 29-Mar-2009 stsp

For SPF calculation, we will need the source address specified
in hello packets by next-hop neighbours. So when notifying the
RDE of a new neighbour, send the source address, too.

ok claudio@


Revision tags: OPENBSD_4_5_BASE
# 1.14 19-Feb-2009 stsp

Remove origination of Intra-Area-Prefix LSAs from ospfe.
Will soon be done in rde instead.

"Sure but don't wait too long before readding the code in rde" claudio@


# 1.13 29-Jan-2009 stsp

Originate Intra-Area-Prefix LSAs which reference a router LSA.
Routers can now advertise prefixes with global scope throughout
an area. This paves the way towards doing SPF calculations to
generate routing tables for a single area.
ok claudio@


# 1.12 27-Jan-2009 stsp

Propagate the neighbour's interface ID, as received in hello packets,
to the RDE.
ok claudio@


# 1.11 30-Dec-2008 claudio

First try at originating Link (type-8) LSA. Code is wrong and the initial
LSA is lost in lsa_flood. Put this in because it goes in the right direction
and ospf6d is work in progress. Add necessary framework so that we can print
Link LSA in ospf6ctl.
Diff mostly from stsp@ ospf6ctl part by myself


# 1.10 28-Dec-2008 claudio

Send the interface index in the correct byte order and add iface_id to
struct nbr to identify the neighbors correclty.
From Stefan Sperling stsp (at) stsp.name


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.9 13-Dec-2007 claudio

Monster commit of stuff I did mostly last month. What it does:
* removes kif and uses iface for everything interface related.
This removes unneeded data redundancy which makes the code more complex.
* adds the link local prefix to struct iface and attaches a list with
the other prefixes to the struct iface. This is needed to generate the
link LSA.
* disconnects struct iface from struct area (the backpointer is gone)
this will make the reload code a bit easier.
norby@ agrees with the direction we're heading with this


# 1.8 13-Oct-2007 claudio

From ospfd: Funny typo, it is fib not fip so adjust function name.


# 1.7 11-Oct-2007 claudio

In OSPFv3 auth crypt is no longer (actually all the auth code is gone) so
kill crypt_seq_num as well.


# 1.6 11-Oct-2007 claudio

area_ospf_options() should return the options in network byte order.


# 1.5 11-Oct-2007 claudio

From ospfd:
Do not overload nbr->options with the dd exchange bits. nbr->options is used
by the hello protocol. Instead add a dd_more flag that is used together with
(the renamed) dd_master flag.


# 1.4 10-Oct-2007 claudio

send_packet() now takes a struct in6_addr as destination instead of a
struct sockaddr_in6 and builds the struct sockaddr_in6 internaly adding scope
if necessary. While there switch to sendto() we don't need any of the sendmsg()
features here.
OK norby@


# 1.3 09-Oct-2007 claudio

Remaining bit of last night work. Make packet reception use all the goodies
introduced (checksumming is no longer needed, no IP header checking is needed,
get a in6_pktinfo with the ifindex and dest addr, cleanup and remove a lot
of other code). With this ospf6d is able to send and receive first hello
packets. OK norby@


# 1.2 09-Oct-2007 claudio

Instead of IP_RECVIF we use IPV6_RECVPKTINFO to get the ifindex and the
destination address of incomming packets. This also removes the need for
IP_HDRINCL. Additionally use IPV6_CHECKSUM to let the kernel do the
necessary packet checksumming, way easier than doing it in userland.
OK norby@


# 1.1 08-Oct-2007 norby

Welcome ospf6d

The new ospf6d daemon will support OSPFv3, basically OSPF for IPv6 networks.

It is heavily based on ospfd(8), it is more or less a copy and paste of it.
Currently some unneeded stuff has been removed and the trasition from
IPv4 to IPv6 has begun.

ospf6d is not very usefull at the moment, it is being imported to allow more
people to work on it concurrently.

Not yet connected to the builds.

ok claudio@ dlg@


# 1.23 02-Jan-2020 denis

Rename orig_rtr_lsa_area() to orig_rtr_lsa()

Now that area is part of iface, original orig_rtr_lsa() is useless. Also
verifying that area != NULL is not needed in some cases (these are
leftovers of the previous diff).

OK remi@


# 1.22 28-Dec-2019 denis

Refactor link state ack/req.

OK remi@


# 1.21 22-Dec-2019 denis

Scale send buffer on socket.

OK remi@


# 1.20 11-Dec-2019 denis

Convert sendto() to sendmsg().

This makes code similar to ospfd(8).

OK claudio@ deraadt@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE
# 1.19 25-Oct-2014 lteo

Remove unnecessary netinet/in_systm.h include.

ok millert@


Revision tags: OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.18 25-Mar-2013 markus

sync w/ospfd: improve snapshot handling; ok claudio, sthen


Revision tags: OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
# 1.17 22-Aug-2010 bluhm

Origin network-LSA with options based on the options of the link-LSAs.
Without this fix Cisco's OSPF 6 ignores our network-LSAs.
ok claudio@


Revision tags: OPENBSD_4_8_BASE
# 1.16 26-May-2010 nicm

Rename some imsg bits to make namespace collisions less likely buf to
ibuf, buf_read to ibuf_read, READ_BUF_SIZE to IBUF_READ_SIZE.

ok henning gilles claudio jacekm deraadt


Revision tags: OPENBSD_4_6_BASE OPENBSD_4_7_BASE
# 1.15 29-Mar-2009 stsp

For SPF calculation, we will need the source address specified
in hello packets by next-hop neighbours. So when notifying the
RDE of a new neighbour, send the source address, too.

ok claudio@


Revision tags: OPENBSD_4_5_BASE
# 1.14 19-Feb-2009 stsp

Remove origination of Intra-Area-Prefix LSAs from ospfe.
Will soon be done in rde instead.

"Sure but don't wait too long before readding the code in rde" claudio@


# 1.13 29-Jan-2009 stsp

Originate Intra-Area-Prefix LSAs which reference a router LSA.
Routers can now advertise prefixes with global scope throughout
an area. This paves the way towards doing SPF calculations to
generate routing tables for a single area.
ok claudio@


# 1.12 27-Jan-2009 stsp

Propagate the neighbour's interface ID, as received in hello packets,
to the RDE.
ok claudio@


# 1.11 30-Dec-2008 claudio

First try at originating Link (type-8) LSA. Code is wrong and the initial
LSA is lost in lsa_flood. Put this in because it goes in the right direction
and ospf6d is work in progress. Add necessary framework so that we can print
Link LSA in ospf6ctl.
Diff mostly from stsp@ ospf6ctl part by myself


# 1.10 28-Dec-2008 claudio

Send the interface index in the correct byte order and add iface_id to
struct nbr to identify the neighbors correclty.
From Stefan Sperling stsp (at) stsp.name


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.9 13-Dec-2007 claudio

Monster commit of stuff I did mostly last month. What it does:
* removes kif and uses iface for everything interface related.
This removes unneeded data redundancy which makes the code more complex.
* adds the link local prefix to struct iface and attaches a list with
the other prefixes to the struct iface. This is needed to generate the
link LSA.
* disconnects struct iface from struct area (the backpointer is gone)
this will make the reload code a bit easier.
norby@ agrees with the direction we're heading with this


# 1.8 13-Oct-2007 claudio

From ospfd: Funny typo, it is fib not fip so adjust function name.


# 1.7 11-Oct-2007 claudio

In OSPFv3 auth crypt is no longer (actually all the auth code is gone) so
kill crypt_seq_num as well.


# 1.6 11-Oct-2007 claudio

area_ospf_options() should return the options in network byte order.


# 1.5 11-Oct-2007 claudio

From ospfd:
Do not overload nbr->options with the dd exchange bits. nbr->options is used
by the hello protocol. Instead add a dd_more flag that is used together with
(the renamed) dd_master flag.


# 1.4 10-Oct-2007 claudio

send_packet() now takes a struct in6_addr as destination instead of a
struct sockaddr_in6 and builds the struct sockaddr_in6 internaly adding scope
if necessary. While there switch to sendto() we don't need any of the sendmsg()
features here.
OK norby@


# 1.3 09-Oct-2007 claudio

Remaining bit of last night work. Make packet reception use all the goodies
introduced (checksumming is no longer needed, no IP header checking is needed,
get a in6_pktinfo with the ifindex and dest addr, cleanup and remove a lot
of other code). With this ospf6d is able to send and receive first hello
packets. OK norby@


# 1.2 09-Oct-2007 claudio

Instead of IP_RECVIF we use IPV6_RECVPKTINFO to get the ifindex and the
destination address of incomming packets. This also removes the need for
IP_HDRINCL. Additionally use IPV6_CHECKSUM to let the kernel do the
necessary packet checksumming, way easier than doing it in userland.
OK norby@


# 1.1 08-Oct-2007 norby

Welcome ospf6d

The new ospf6d daemon will support OSPFv3, basically OSPF for IPv6 networks.

It is heavily based on ospfd(8), it is more or less a copy and paste of it.
Currently some unneeded stuff has been removed and the trasition from
IPv4 to IPv6 has begun.

ospf6d is not very usefull at the moment, it is being imported to allow more
people to work on it concurrently.

Not yet connected to the builds.

ok claudio@ dlg@


# 1.22 28-Dec-2019 denis

Refactor link state ack/req.

OK remi@


# 1.21 22-Dec-2019 denis

Scale send buffer on socket.

OK remi@


# 1.20 11-Dec-2019 denis

Convert sendto() to sendmsg().

This makes code similar to ospfd(8).

OK claudio@ deraadt@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE
# 1.19 25-Oct-2014 lteo

Remove unnecessary netinet/in_systm.h include.

ok millert@


Revision tags: OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.18 25-Mar-2013 markus

sync w/ospfd: improve snapshot handling; ok claudio, sthen


Revision tags: OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
# 1.17 22-Aug-2010 bluhm

Origin network-LSA with options based on the options of the link-LSAs.
Without this fix Cisco's OSPF 6 ignores our network-LSAs.
ok claudio@


Revision tags: OPENBSD_4_8_BASE
# 1.16 26-May-2010 nicm

Rename some imsg bits to make namespace collisions less likely buf to
ibuf, buf_read to ibuf_read, READ_BUF_SIZE to IBUF_READ_SIZE.

ok henning gilles claudio jacekm deraadt


Revision tags: OPENBSD_4_6_BASE OPENBSD_4_7_BASE
# 1.15 29-Mar-2009 stsp

For SPF calculation, we will need the source address specified
in hello packets by next-hop neighbours. So when notifying the
RDE of a new neighbour, send the source address, too.

ok claudio@


Revision tags: OPENBSD_4_5_BASE
# 1.14 19-Feb-2009 stsp

Remove origination of Intra-Area-Prefix LSAs from ospfe.
Will soon be done in rde instead.

"Sure but don't wait too long before readding the code in rde" claudio@


# 1.13 29-Jan-2009 stsp

Originate Intra-Area-Prefix LSAs which reference a router LSA.
Routers can now advertise prefixes with global scope throughout
an area. This paves the way towards doing SPF calculations to
generate routing tables for a single area.
ok claudio@


# 1.12 27-Jan-2009 stsp

Propagate the neighbour's interface ID, as received in hello packets,
to the RDE.
ok claudio@


# 1.11 30-Dec-2008 claudio

First try at originating Link (type-8) LSA. Code is wrong and the initial
LSA is lost in lsa_flood. Put this in because it goes in the right direction
and ospf6d is work in progress. Add necessary framework so that we can print
Link LSA in ospf6ctl.
Diff mostly from stsp@ ospf6ctl part by myself


# 1.10 28-Dec-2008 claudio

Send the interface index in the correct byte order and add iface_id to
struct nbr to identify the neighbors correclty.
From Stefan Sperling stsp (at) stsp.name


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.9 13-Dec-2007 claudio

Monster commit of stuff I did mostly last month. What it does:
* removes kif and uses iface for everything interface related.
This removes unneeded data redundancy which makes the code more complex.
* adds the link local prefix to struct iface and attaches a list with
the other prefixes to the struct iface. This is needed to generate the
link LSA.
* disconnects struct iface from struct area (the backpointer is gone)
this will make the reload code a bit easier.
norby@ agrees with the direction we're heading with this


# 1.8 13-Oct-2007 claudio

From ospfd: Funny typo, it is fib not fip so adjust function name.


# 1.7 11-Oct-2007 claudio

In OSPFv3 auth crypt is no longer (actually all the auth code is gone) so
kill crypt_seq_num as well.


# 1.6 11-Oct-2007 claudio

area_ospf_options() should return the options in network byte order.


# 1.5 11-Oct-2007 claudio

From ospfd:
Do not overload nbr->options with the dd exchange bits. nbr->options is used
by the hello protocol. Instead add a dd_more flag that is used together with
(the renamed) dd_master flag.


# 1.4 10-Oct-2007 claudio

send_packet() now takes a struct in6_addr as destination instead of a
struct sockaddr_in6 and builds the struct sockaddr_in6 internaly adding scope
if necessary. While there switch to sendto() we don't need any of the sendmsg()
features here.
OK norby@


# 1.3 09-Oct-2007 claudio

Remaining bit of last night work. Make packet reception use all the goodies
introduced (checksumming is no longer needed, no IP header checking is needed,
get a in6_pktinfo with the ifindex and dest addr, cleanup and remove a lot
of other code). With this ospf6d is able to send and receive first hello
packets. OK norby@


# 1.2 09-Oct-2007 claudio

Instead of IP_RECVIF we use IPV6_RECVPKTINFO to get the ifindex and the
destination address of incomming packets. This also removes the need for
IP_HDRINCL. Additionally use IPV6_CHECKSUM to let the kernel do the
necessary packet checksumming, way easier than doing it in userland.
OK norby@


# 1.1 08-Oct-2007 norby

Welcome ospf6d

The new ospf6d daemon will support OSPFv3, basically OSPF for IPv6 networks.

It is heavily based on ospfd(8), it is more or less a copy and paste of it.
Currently some unneeded stuff has been removed and the trasition from
IPv4 to IPv6 has begun.

ospf6d is not very usefull at the moment, it is being imported to allow more
people to work on it concurrently.

Not yet connected to the builds.

ok claudio@ dlg@


# 1.21 22-Dec-2019 denis

Scale send buffer on socket.

OK remi@


# 1.20 11-Dec-2019 denis

Convert sendto() to sendmsg().

This makes code similar to ospfd(8).

OK claudio@ deraadt@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE
# 1.19 25-Oct-2014 lteo

Remove unnecessary netinet/in_systm.h include.

ok millert@


Revision tags: OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.18 25-Mar-2013 markus

sync w/ospfd: improve snapshot handling; ok claudio, sthen


Revision tags: OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
# 1.17 22-Aug-2010 bluhm

Origin network-LSA with options based on the options of the link-LSAs.
Without this fix Cisco's OSPF 6 ignores our network-LSAs.
ok claudio@


Revision tags: OPENBSD_4_8_BASE
# 1.16 26-May-2010 nicm

Rename some imsg bits to make namespace collisions less likely buf to
ibuf, buf_read to ibuf_read, READ_BUF_SIZE to IBUF_READ_SIZE.

ok henning gilles claudio jacekm deraadt


Revision tags: OPENBSD_4_6_BASE OPENBSD_4_7_BASE
# 1.15 29-Mar-2009 stsp

For SPF calculation, we will need the source address specified
in hello packets by next-hop neighbours. So when notifying the
RDE of a new neighbour, send the source address, too.

ok claudio@


Revision tags: OPENBSD_4_5_BASE
# 1.14 19-Feb-2009 stsp

Remove origination of Intra-Area-Prefix LSAs from ospfe.
Will soon be done in rde instead.

"Sure but don't wait too long before readding the code in rde" claudio@


# 1.13 29-Jan-2009 stsp

Originate Intra-Area-Prefix LSAs which reference a router LSA.
Routers can now advertise prefixes with global scope throughout
an area. This paves the way towards doing SPF calculations to
generate routing tables for a single area.
ok claudio@


# 1.12 27-Jan-2009 stsp

Propagate the neighbour's interface ID, as received in hello packets,
to the RDE.
ok claudio@


# 1.11 30-Dec-2008 claudio

First try at originating Link (type-8) LSA. Code is wrong and the initial
LSA is lost in lsa_flood. Put this in because it goes in the right direction
and ospf6d is work in progress. Add necessary framework so that we can print
Link LSA in ospf6ctl.
Diff mostly from stsp@ ospf6ctl part by myself


# 1.10 28-Dec-2008 claudio

Send the interface index in the correct byte order and add iface_id to
struct nbr to identify the neighbors correclty.
From Stefan Sperling stsp (at) stsp.name


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.9 13-Dec-2007 claudio

Monster commit of stuff I did mostly last month. What it does:
* removes kif and uses iface for everything interface related.
This removes unneeded data redundancy which makes the code more complex.
* adds the link local prefix to struct iface and attaches a list with
the other prefixes to the struct iface. This is needed to generate the
link LSA.
* disconnects struct iface from struct area (the backpointer is gone)
this will make the reload code a bit easier.
norby@ agrees with the direction we're heading with this


# 1.8 13-Oct-2007 claudio

From ospfd: Funny typo, it is fib not fip so adjust function name.


# 1.7 11-Oct-2007 claudio

In OSPFv3 auth crypt is no longer (actually all the auth code is gone) so
kill crypt_seq_num as well.


# 1.6 11-Oct-2007 claudio

area_ospf_options() should return the options in network byte order.


# 1.5 11-Oct-2007 claudio

From ospfd:
Do not overload nbr->options with the dd exchange bits. nbr->options is used
by the hello protocol. Instead add a dd_more flag that is used together with
(the renamed) dd_master flag.


# 1.4 10-Oct-2007 claudio

send_packet() now takes a struct in6_addr as destination instead of a
struct sockaddr_in6 and builds the struct sockaddr_in6 internaly adding scope
if necessary. While there switch to sendto() we don't need any of the sendmsg()
features here.
OK norby@


# 1.3 09-Oct-2007 claudio

Remaining bit of last night work. Make packet reception use all the goodies
introduced (checksumming is no longer needed, no IP header checking is needed,
get a in6_pktinfo with the ifindex and dest addr, cleanup and remove a lot
of other code). With this ospf6d is able to send and receive first hello
packets. OK norby@


# 1.2 09-Oct-2007 claudio

Instead of IP_RECVIF we use IPV6_RECVPKTINFO to get the ifindex and the
destination address of incomming packets. This also removes the need for
IP_HDRINCL. Additionally use IPV6_CHECKSUM to let the kernel do the
necessary packet checksumming, way easier than doing it in userland.
OK norby@


# 1.1 08-Oct-2007 norby

Welcome ospf6d

The new ospf6d daemon will support OSPFv3, basically OSPF for IPv6 networks.

It is heavily based on ospfd(8), it is more or less a copy and paste of it.
Currently some unneeded stuff has been removed and the trasition from
IPv4 to IPv6 has begun.

ospf6d is not very usefull at the moment, it is being imported to allow more
people to work on it concurrently.

Not yet connected to the builds.

ok claudio@ dlg@


# 1.20 11-Dec-2019 denis

Convert sendto() to sendmsg().

This makes code similar to ospfd(8).

OK claudio@ deraadt@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE
# 1.19 25-Oct-2014 lteo

Remove unnecessary netinet/in_systm.h include.

ok millert@


Revision tags: OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.18 25-Mar-2013 markus

sync w/ospfd: improve snapshot handling; ok claudio, sthen


Revision tags: OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
# 1.17 22-Aug-2010 bluhm

Origin network-LSA with options based on the options of the link-LSAs.
Without this fix Cisco's OSPF 6 ignores our network-LSAs.
ok claudio@


Revision tags: OPENBSD_4_8_BASE
# 1.16 26-May-2010 nicm

Rename some imsg bits to make namespace collisions less likely buf to
ibuf, buf_read to ibuf_read, READ_BUF_SIZE to IBUF_READ_SIZE.

ok henning gilles claudio jacekm deraadt


Revision tags: OPENBSD_4_6_BASE OPENBSD_4_7_BASE
# 1.15 29-Mar-2009 stsp

For SPF calculation, we will need the source address specified
in hello packets by next-hop neighbours. So when notifying the
RDE of a new neighbour, send the source address, too.

ok claudio@


Revision tags: OPENBSD_4_5_BASE
# 1.14 19-Feb-2009 stsp

Remove origination of Intra-Area-Prefix LSAs from ospfe.
Will soon be done in rde instead.

"Sure but don't wait too long before readding the code in rde" claudio@


# 1.13 29-Jan-2009 stsp

Originate Intra-Area-Prefix LSAs which reference a router LSA.
Routers can now advertise prefixes with global scope throughout
an area. This paves the way towards doing SPF calculations to
generate routing tables for a single area.
ok claudio@


# 1.12 27-Jan-2009 stsp

Propagate the neighbour's interface ID, as received in hello packets,
to the RDE.
ok claudio@


# 1.11 30-Dec-2008 claudio

First try at originating Link (type-8) LSA. Code is wrong and the initial
LSA is lost in lsa_flood. Put this in because it goes in the right direction
and ospf6d is work in progress. Add necessary framework so that we can print
Link LSA in ospf6ctl.
Diff mostly from stsp@ ospf6ctl part by myself


# 1.10 28-Dec-2008 claudio

Send the interface index in the correct byte order and add iface_id to
struct nbr to identify the neighbors correclty.
From Stefan Sperling stsp (at) stsp.name


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.9 13-Dec-2007 claudio

Monster commit of stuff I did mostly last month. What it does:
* removes kif and uses iface for everything interface related.
This removes unneeded data redundancy which makes the code more complex.
* adds the link local prefix to struct iface and attaches a list with
the other prefixes to the struct iface. This is needed to generate the
link LSA.
* disconnects struct iface from struct area (the backpointer is gone)
this will make the reload code a bit easier.
norby@ agrees with the direction we're heading with this


# 1.8 13-Oct-2007 claudio

From ospfd: Funny typo, it is fib not fip so adjust function name.


# 1.7 11-Oct-2007 claudio

In OSPFv3 auth crypt is no longer (actually all the auth code is gone) so
kill crypt_seq_num as well.


# 1.6 11-Oct-2007 claudio

area_ospf_options() should return the options in network byte order.


# 1.5 11-Oct-2007 claudio

From ospfd:
Do not overload nbr->options with the dd exchange bits. nbr->options is used
by the hello protocol. Instead add a dd_more flag that is used together with
(the renamed) dd_master flag.


# 1.4 10-Oct-2007 claudio

send_packet() now takes a struct in6_addr as destination instead of a
struct sockaddr_in6 and builds the struct sockaddr_in6 internaly adding scope
if necessary. While there switch to sendto() we don't need any of the sendmsg()
features here.
OK norby@


# 1.3 09-Oct-2007 claudio

Remaining bit of last night work. Make packet reception use all the goodies
introduced (checksumming is no longer needed, no IP header checking is needed,
get a in6_pktinfo with the ifindex and dest addr, cleanup and remove a lot
of other code). With this ospf6d is able to send and receive first hello
packets. OK norby@


# 1.2 09-Oct-2007 claudio

Instead of IP_RECVIF we use IPV6_RECVPKTINFO to get the ifindex and the
destination address of incomming packets. This also removes the need for
IP_HDRINCL. Additionally use IPV6_CHECKSUM to let the kernel do the
necessary packet checksumming, way easier than doing it in userland.
OK norby@


# 1.1 08-Oct-2007 norby

Welcome ospf6d

The new ospf6d daemon will support OSPFv3, basically OSPF for IPv6 networks.

It is heavily based on ospfd(8), it is more or less a copy and paste of it.
Currently some unneeded stuff has been removed and the trasition from
IPv4 to IPv6 has begun.

ospf6d is not very usefull at the moment, it is being imported to allow more
people to work on it concurrently.

Not yet connected to the builds.

ok claudio@ dlg@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.19 25-Oct-2014 lteo

Remove unnecessary netinet/in_systm.h include.

ok millert@


Revision tags: OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.18 25-Mar-2013 markus

sync w/ospfd: improve snapshot handling; ok claudio, sthen


Revision tags: OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
# 1.17 22-Aug-2010 bluhm

Origin network-LSA with options based on the options of the link-LSAs.
Without this fix Cisco's OSPF 6 ignores our network-LSAs.
ok claudio@


Revision tags: OPENBSD_4_8_BASE
# 1.16 26-May-2010 nicm

Rename some imsg bits to make namespace collisions less likely buf to
ibuf, buf_read to ibuf_read, READ_BUF_SIZE to IBUF_READ_SIZE.

ok henning gilles claudio jacekm deraadt


Revision tags: OPENBSD_4_6_BASE OPENBSD_4_7_BASE
# 1.15 29-Mar-2009 stsp

For SPF calculation, we will need the source address specified
in hello packets by next-hop neighbours. So when notifying the
RDE of a new neighbour, send the source address, too.

ok claudio@


Revision tags: OPENBSD_4_5_BASE
# 1.14 19-Feb-2009 stsp

Remove origination of Intra-Area-Prefix LSAs from ospfe.
Will soon be done in rde instead.

"Sure but don't wait too long before readding the code in rde" claudio@


# 1.13 29-Jan-2009 stsp

Originate Intra-Area-Prefix LSAs which reference a router LSA.
Routers can now advertise prefixes with global scope throughout
an area. This paves the way towards doing SPF calculations to
generate routing tables for a single area.
ok claudio@


# 1.12 27-Jan-2009 stsp

Propagate the neighbour's interface ID, as received in hello packets,
to the RDE.
ok claudio@


# 1.11 30-Dec-2008 claudio

First try at originating Link (type-8) LSA. Code is wrong and the initial
LSA is lost in lsa_flood. Put this in because it goes in the right direction
and ospf6d is work in progress. Add necessary framework so that we can print
Link LSA in ospf6ctl.
Diff mostly from stsp@ ospf6ctl part by myself


# 1.10 28-Dec-2008 claudio

Send the interface index in the correct byte order and add iface_id to
struct nbr to identify the neighbors correclty.
From Stefan Sperling stsp (at) stsp.name


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.9 13-Dec-2007 claudio

Monster commit of stuff I did mostly last month. What it does:
* removes kif and uses iface for everything interface related.
This removes unneeded data redundancy which makes the code more complex.
* adds the link local prefix to struct iface and attaches a list with
the other prefixes to the struct iface. This is needed to generate the
link LSA.
* disconnects struct iface from struct area (the backpointer is gone)
this will make the reload code a bit easier.
norby@ agrees with the direction we're heading with this


# 1.8 13-Oct-2007 claudio

From ospfd: Funny typo, it is fib not fip so adjust function name.


# 1.7 11-Oct-2007 claudio

In OSPFv3 auth crypt is no longer (actually all the auth code is gone) so
kill crypt_seq_num as well.


# 1.6 11-Oct-2007 claudio

area_ospf_options() should return the options in network byte order.


# 1.5 11-Oct-2007 claudio

From ospfd:
Do not overload nbr->options with the dd exchange bits. nbr->options is used
by the hello protocol. Instead add a dd_more flag that is used together with
(the renamed) dd_master flag.


# 1.4 10-Oct-2007 claudio

send_packet() now takes a struct in6_addr as destination instead of a
struct sockaddr_in6 and builds the struct sockaddr_in6 internaly adding scope
if necessary. While there switch to sendto() we don't need any of the sendmsg()
features here.
OK norby@


# 1.3 09-Oct-2007 claudio

Remaining bit of last night work. Make packet reception use all the goodies
introduced (checksumming is no longer needed, no IP header checking is needed,
get a in6_pktinfo with the ifindex and dest addr, cleanup and remove a lot
of other code). With this ospf6d is able to send and receive first hello
packets. OK norby@


# 1.2 09-Oct-2007 claudio

Instead of IP_RECVIF we use IPV6_RECVPKTINFO to get the ifindex and the
destination address of incomming packets. This also removes the need for
IP_HDRINCL. Additionally use IPV6_CHECKSUM to let the kernel do the
necessary packet checksumming, way easier than doing it in userland.
OK norby@


# 1.1 08-Oct-2007 norby

Welcome ospf6d

The new ospf6d daemon will support OSPFv3, basically OSPF for IPv6 networks.

It is heavily based on ospfd(8), it is more or less a copy and paste of it.
Currently some unneeded stuff has been removed and the trasition from
IPv4 to IPv6 has begun.

ospf6d is not very usefull at the moment, it is being imported to allow more
people to work on it concurrently.

Not yet connected to the builds.

ok claudio@ dlg@