Revision 48e5f32d proto/ospf/ospf.h

View differences:

proto/ospf/ospf.h
10 10
#define _BIRD_OSPF_H_
11 11

  
12 12
#define MAXNETS 10
13
#define OSPF_MIN_PKT_SIZE 256
13 14
#define OSPF_MAX_PKT_SIZE 65535
14
/*
15
 * RFC 2328 says, maximum packet size is 65535 (IP packet size
16
 * limit). Really a bit less for OSPF, because this contains also IP
17
 * header. This could be too much for small systems, so I normally
18
 * allocate 2*mtu (i found one cisco sending packets mtu+16). OSPF
19
 * packets are almost always sent small enough to not be fragmented.
20
 */
21 15

  
22 16
#ifdef LOCAL_DEBUG
23 17
#define OSPF_FORCE_DEBUG 1
......
78 72
#define DEFAULT_ECMP_LIMIT 16
79 73
#define DEFAULT_TRANSINT 40
80 74

  
75
#define OSPF_VLINK_ID_OFFSET 0x80000000
76

  
81 77

  
82 78
struct ospf_config
83 79
{
......
179 175
struct ospf_iface
180 176
{
181 177
  node n;
182
  struct iface *iface;		/* Nest's iface, non-NULL (unless type OSPF_IT_VLINK) */
178
  struct iface *iface;		/* Nest's iface (NULL for vlinks) */
183 179
  struct ifa *addr;		/* IP prefix associated with that OSPF iface */
184 180
  struct ospf_area *oa;
185 181
  struct ospf_iface_patt *cf;
182
  char *ifname;			/* Interface name (iface->name), new one for vlinks */
183

  
186 184
  pool *pool;
187
  sock *sk;			/* IP socket (for DD ...) */
185
  sock *sk;			/* IP socket */
188 186
  list neigh_list;		/* List of neigbours */
189 187
  u32 cost;			/* Cost of iface */
190 188
  u32 waitint;			/* number of sec before changing state from wait */
......
273 271
  u8 sk_dr; 			/* Socket is a member of DRouters group */
274 272
  u8 marked;			/* Used in OSPF reconfigure */
275 273
  u16 rxbuf;			/* Buffer size */
274
  u16 tx_length;		/* Soft TX packet length limit, usually MTU */
276 275
  u8 check_link;		/* Whether iface link change is used */
277 276
  u8 ecmp_weight;		/* Weight used for ECMP */
278 277
  u8 ptp_netmask;		/* Send real netmask for P2P */
......
704 703
  slist lsrtl;			/* Link state retransmission list */
705 704
  siterator lsrti;
706 705
  struct top_graph *lsrth;
707
  void *ldbdes;			/* Last database description packet */
708 706
  timer *rxmt_timer;		/* RXMT timer */
709 707
  list ackl[2];
710 708
#define ACKL_DIRECT 0
711 709
#define ACKL_DELAY 1
712 710
  timer *ackd_timer;		/* Delayed ack timer */
713 711
  struct bfd_request *bfd_req;	/* BFD request, if BFD is used */
712
  void *ldd_buffer;		/* Last database description packet */
713
  u32 ldd_bsize;		/* Buffer size for ldd_buffer */
714 714
  u32 csn;                      /* Last received crypt seq number (for MD5) */
715 715
};
716 716

  
......
783 783
  void *lsab;			/* LSA buffer used when originating router LSAs */
784 784
  int lsab_size, lsab_used;
785 785
  linpool *nhpool;		/* Linpool used for next hops computed in SPF */
786
  sock *vlink_sk;		/* IP socket used for vlink TX */
786 787
  u32 router_id;
787 788
  u32 last_vlink_id;		/* Interface IDs for vlinks (starts at 0x80000000) */
788 789
};
......
806 807
  u32 vid;
807 808
  int tx_tos;
808 809
  int tx_priority;
809
  u16 rxbuf;
810
#define OSPF_RXBUF_NORMAL 0
811
#define OSPF_RXBUF_LARGE 1
810
  u16 tx_length;
811
  u16 rx_buffer;
812

  
812 813
#define OSPF_RXBUF_MINSIZE 256	/* Minimal allowed size */
813 814
  u16 autype;			/* Not really used in OSPFv3 */
814 815
#define OSPF_AUTH_NONE 0
......
822 823
  u8 ptp_netmask;		/* bool + 2 for unspecified */
823 824
  u8 ttl_security;		/* bool + 2 for TX only */
824 825
  u8 bfd;
826
  u8 bsd_secondary;
825 827

  
826 828
#ifdef OSPFv2
827 829
  list *passwords;

Also available in: Unified diff