Revision 72a6ef11 proto/bgp/bgp.h

View differences:

proto/bgp/bgp.h
22 22
struct bgp_conn {
23 23
  struct bgp_proto *bgp;
24 24
  struct birdsock *sk;
25
  int state;				/* State of connection state machine */
25
  unsigned int state;			/* State of connection state machine */
26 26
  struct timer *connect_retry_timer;
27 27
  struct timer *hold_timer;
28 28
  struct timer *keepalive_timer;
29
  unsigned int packets_to_send;		/* Bitmap of packet types to be sent */
30
  unsigned int notify_code, notify_subcode, notify_arg, notify_arg_size;
31
  unsigned int error_flag;		/* Error state, ignore all input */
29 32
};
30 33

  
31 34
struct bgp_proto {
......
42 45
  struct object_lock *lock;		/* Lock for neighbor connection */
43 46
};
44 47

  
45
#define BGP_PORT 179
46
#define BGP_RX_BUFFER_SIZE 4096
48
#define BGP_PORT		179
49
#define BGP_VERSION		4
50
#define BGP_HEADER_LENGTH	19
51
#define BGP_MAX_PACKET_LENGTH	4096
52
#define BGP_RX_BUFFER_SIZE	4096
53
#define BGP_TX_BUFFER_SIZE	BGP_MAX_PACKET_LENGTH
47 54

  
48 55
void bgp_check(struct bgp_config *c);
49 56

  
......
51 58

  
52 59
/* packets.c */
53 60

  
61
void bgp_schedule_packet(struct bgp_conn *conn, int type);
62
void bgp_tx(struct birdsock *sk);
63
int bgp_rx(struct birdsock *sk, int size);
64

  
54 65
/* Packet types */
55 66

  
56 67
#define PKT_OPEN		0x01
57 68
#define PKT_UPDATE		0x02
58 69
#define PKT_NOTIFICATION	0x03
59 70
#define PKT_KEEPALIVE		0x04
71
#define PKT_SCHEDULE_CLOSE	0x1f	/* Used internally to schedule socket close */
60 72

  
61 73
/* Attributes */
62 74

  

Also available in: Unified diff