summaryrefslogtreecommitdiff
path: root/usr.sbin/ldpd/ldpd.h
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2013-06-03 16:53:50 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2013-06-03 16:53:50 +0000
commit6a7c51c766f42977082e7093a0f3c39681622300 (patch)
tree583c6073e776d8dde116bedf7ee408e2ed970ab2 /usr.sbin/ldpd/ldpd.h
parent6830dafb7daa3e56539c37daeb815bc4d18e284b (diff)
Implement support for multiple addresses per interface.
This replaces the way addresses and interface are chained together. In ospfd there was a 1 to 1 mapping (with iface clones) but LDP does not have that limitation. Diff from Renato Westphal
Diffstat (limited to 'usr.sbin/ldpd/ldpd.h')
-rw-r--r--usr.sbin/ldpd/ldpd.h34
1 files changed, 24 insertions, 10 deletions
diff --git a/usr.sbin/ldpd/ldpd.h b/usr.sbin/ldpd/ldpd.h
index c111b209eea..d94da0a5626 100644
--- a/usr.sbin/ldpd/ldpd.h
+++ b/usr.sbin/ldpd/ldpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldpd.h,v 1.36 2013/06/01 19:42:07 claudio Exp $ */
+/* $OpenBSD: ldpd.h,v 1.37 2013/06/03 16:53:49 claudio Exp $ */
/*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
@@ -82,7 +82,11 @@ enum imsg_type {
IMSG_CTL_LOG_VERBOSE,
IMSG_KLABEL_CHANGE,
IMSG_KLABEL_DELETE,
- IMSG_IFINFO,
+ IMSG_IFSTATUS,
+ IMSG_IFUP,
+ IMSG_IFDOWN,
+ IMSG_NEWADDR,
+ IMSG_DELADDR,
IMSG_LABEL_MAPPING,
IMSG_LABEL_MAPPING_FULL,
IMSG_LABEL_REQUEST,
@@ -118,13 +122,15 @@ enum imsg_type {
enum iface_event {
IF_EVT_NOTHING,
IF_EVT_UP,
- IF_EVT_DOWN
+ IF_EVT_DOWN,
+ IF_EVT_NEWADDR,
+ IF_EVT_DELADDR
};
/* interface actions */
enum iface_action {
IF_ACT_NOTHING,
- IF_ACT_STRT,
+ IF_ACT_UPDATE,
IF_ACT_RST
};
@@ -193,6 +199,14 @@ struct notify_msg {
u_int32_t type;
};
+struct if_addr {
+ LIST_ENTRY(if_addr) global_entry;
+ LIST_ENTRY(if_addr) iface_entry;
+ struct in_addr addr;
+ struct in_addr mask;
+ struct in_addr dstbrd;
+};
+
struct iface {
LIST_ENTRY(iface) entry;
struct event hello_timer;
@@ -200,9 +214,7 @@ struct iface {
LIST_HEAD(, lde_nbr) lde_nbr_list;
char name[IF_NAMESIZE];
- struct in_addr addr;
- struct in_addr dst;
- struct in_addr mask;
+ LIST_HEAD(, if_addr) addr_list;
u_int64_t baudrate;
time_t uptime;
@@ -243,6 +255,7 @@ struct ldpd_conf {
struct event disc_ev;
struct in_addr rtr_id;
LIST_HEAD(, iface) iface_list;
+ LIST_HEAD(, if_addr) addr_list;
u_int32_t opts;
#define LDPD_OPT_VERBOSE 0x00000001
@@ -268,8 +281,8 @@ struct kroute {
u_int8_t priority;
};
-struct kif_addr {
- TAILQ_ENTRY(kif_addr) entry;
+struct kaddr {
+ u_short ifindex;
struct in_addr addr;
struct in_addr mask;
struct in_addr dstbrd;
@@ -350,6 +363,7 @@ void session_socket_blockmode(int, enum blockmodes);
/* kroute.c */
int kif_init(void);
+void kif_redistribute(void);
int kr_init(int);
int kr_change(struct kroute *);
int kr_delete(struct kroute *);
@@ -359,7 +373,7 @@ void kr_fib_decouple(void);
void kr_dispatch_msg(int, short, void *);
void kr_show_route(struct imsg *);
void kr_ifinfo(char *, pid_t);
-struct kif *kif_findname(char *, struct in_addr, struct kif_addr **);
+struct kif *kif_findname(char *);
void kr_reload(void);
u_int8_t mask2prefixlen(in_addr_t);