]> git.proxmox.com Git - mirror_frr.git/blame - bgpd/bgp_packet.h
Changes to improve BGP convergence time:
[mirror_frr.git] / bgpd / bgp_packet.h
CommitLineData
718e3744 1/* BGP packet management header.
2 Copyright (C) 1999 Kunihiro Ishiguro
3
4This file is part of GNU Zebra.
5
6GNU Zebra is free software; you can redistribute it and/or modify it
7under the terms of the GNU General Public License as published by the
8Free Software Foundation; either version 2, or (at your option) any
9later version.
10
11GNU Zebra is distributed in the hope that it will be useful, but
12WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GNU Zebra; see the file COPYING. If not, write to the Free
18Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1902111-1307, USA. */
20
00d252cb 21#ifndef _QUAGGA_BGP_PACKET_H
22#define _QUAGGA_BGP_PACKET_H
23
fd79ac91 24#define BGP_NLRI_LENGTH 1U
25#define BGP_TOTAL_ATTR_LEN 2U
26#define BGP_UNFEASIBLE_LEN 2U
27#define BGP_WRITE_PACKET_MAX 10U
718e3744 28
d889623f
DS
29/* Size of FIFOs upon which write thread is triggered. Note that write
30 * thread is also triggered upon BGP work-queue completion.
31 */
32#define BGP_ADV_FIFO_QUANTA 500
33#define BGP_WD_FIFO_QUANTA 200
34
718e3744 35/* When to refresh */
36#define REFRESH_IMMEDIATE 1
37#define REFRESH_DEFER 2
38
39/* ORF Common part flag */
40#define ORF_COMMON_PART_ADD 0x00
41#define ORF_COMMON_PART_REMOVE 0x80
42#define ORF_COMMON_PART_REMOVE_ALL 0xC0
43#define ORF_COMMON_PART_PERMIT 0x00
44#define ORF_COMMON_PART_DENY 0x20
45
46/* Packet send and receive function prototypes. */
94f2b392 47extern int bgp_read (struct thread *);
48extern int bgp_write (struct thread *);
fc9a856f 49extern int bgp_connect_check (struct peer *, int change_state);
718e3744 50
94f2b392 51extern void bgp_keepalive_send (struct peer *);
52extern void bgp_open_send (struct peer *);
53extern void bgp_notify_send (struct peer *, u_int8_t, u_int8_t);
54extern void bgp_notify_send_with_data (struct peer *, u_int8_t, u_int8_t,
5228ad27 55 u_int8_t *, size_t);
94f2b392 56extern void bgp_route_refresh_send (struct peer *, afi_t, safi_t, u_char, u_char, int);
57extern void bgp_capability_send (struct peer *, afi_t, safi_t, int, int);
58extern void bgp_default_update_send (struct peer *, struct attr *,
718e3744 59 afi_t, safi_t, struct peer *);
94f2b392 60extern void bgp_default_withdraw_send (struct peer *, afi_t, safi_t);
00d252cb 61
da88ea82 62extern int bgp_capability_receive (struct peer *, bgp_size_t);
f188f2c4
DS
63extern void bgp_update_restarted_peers (struct peer *);
64extern void bgp_update_implicit_eors (struct peer *);
65extern void bgp_check_update_delay (struct bgp *);
d889623f
DS
66extern int bgp_peer_wd_fifo_exists (struct peer *);
67extern int bgp_peer_adv_fifo_exists (struct peer *, int);
68extern void bgp_peer_schedule_updates(struct peer *peer);
00d252cb 69#endif /* _QUAGGA_BGP_PACKET_H */