blob: 85d640723597e8f7453ccf188e28d31aed6b0d07 [file] [log] [blame]
paul718e3742002-12-13 20:15:29 +00001/* 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
paul00d252c2005-05-23 14:19:54 +000021#ifndef _QUAGGA_BGP_PACKET_H
22#define _QUAGGA_BGP_PACKET_H
23
paulfd79ac92004-10-13 05:06:08 +000024#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
paul718e3742002-12-13 20:15:29 +000028
29/* When to refresh */
30#define REFRESH_IMMEDIATE 1
31#define REFRESH_DEFER 2
32
33/* ORF Common part flag */
34#define ORF_COMMON_PART_ADD 0x00
35#define ORF_COMMON_PART_REMOVE 0x80
36#define ORF_COMMON_PART_REMOVE_ALL 0xC0
37#define ORF_COMMON_PART_PERMIT 0x00
38#define ORF_COMMON_PART_DENY 0x20
39
40/* Packet send and receive function prototypes. */
paul94f2b392005-06-28 12:44:16 +000041extern int bgp_read (struct thread *);
42extern int bgp_write (struct thread *);
paul718e3742002-12-13 20:15:29 +000043
paul94f2b392005-06-28 12:44:16 +000044extern void bgp_keepalive_send (struct peer *);
45extern void bgp_open_send (struct peer *);
46extern void bgp_notify_send (struct peer *, u_int8_t, u_int8_t);
47extern void bgp_notify_send_with_data (struct peer *, u_int8_t, u_int8_t,
paul5228ad22004-06-04 17:58:18 +000048 u_int8_t *, size_t);
paul94f2b392005-06-28 12:44:16 +000049extern void bgp_route_refresh_send (struct peer *, afi_t, safi_t, u_char, u_char, int);
50extern void bgp_capability_send (struct peer *, afi_t, safi_t, int, int);
51extern void bgp_default_update_send (struct peer *, struct attr *,
paul718e3742002-12-13 20:15:29 +000052 afi_t, safi_t, struct peer *);
paul94f2b392005-06-28 12:44:16 +000053extern void bgp_default_withdraw_send (struct peer *, afi_t, safi_t);
paul00d252c2005-05-23 14:19:54 +000054
55#endif /* _QUAGGA_BGP_PACKET_H */