diff options
author | paul <paul> | 2004-02-17 19:45:10 +0000 |
---|---|---|
committer | paul <paul> | 2004-02-17 19:45:10 +0000 |
commit | 717592066c09962a23fb6cc57fba64b1b06cc97a (patch) | |
tree | a193afc9ea4bb038a47355b541ad3d170b04f18d /bgpd/bgpd.h | |
parent | 8defd66df20cc6a15dc1253f43790ee72cd42072 (diff) | |
download | quagga-717592066c09962a23fb6cc57fba64b1b06cc97a.tar.bz2 quagga-717592066c09962a23fb6cc57fba64b1b06cc97a.tar.xz |
2004-02-17 Paul Jakma <paul@dishone.st>
* bgpd.h: (bgp_peer) add fd_local and fd_accept
file descriptor's, fd becomes a pointer to one of these.
* bgpd.c: (global) adjust for fact that fd is now a pointer.
(peer_create_accept) removed.
* bgp_route.c: (global) adjust for change of peer fd to pointer
* bgp_packet.c: (bgp_collision_detect) adjust and remove the
"replace with other peer" hack.
* bgp_network.c: (bgp_accept) Remove the dummy peer hack.
Update peer->fd_accept instead.
(global) Adjust fd references - now a pointer.
* bgp_fsm.c: (global) adjust peer fd to pointer.
(bgp_connection_stop) new function, to stop connection.
(global) adjust everything which closed peer fd to use
bgp_connection_stop().
Diffstat (limited to 'bgpd/bgpd.h')
-rw-r--r-- | bgpd/bgpd.h | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h index 498bd072..a8bfa52f 100644 --- a/bgpd/bgpd.h +++ b/bgpd/bgpd.h @@ -256,27 +256,29 @@ struct peer int ostatus; /* Peer information */ - int fd; /* File descriptor */ - int ttl; /* TTL of TCP connection to the peer. */ - char *desc; /* Description of the peer. */ - unsigned short port; /* Destination port for peer */ - char *host; /* Printable address of the peer. */ - union sockunion su; /* Sockunion address of the peer. */ - time_t uptime; /* Last Up/Down time */ - time_t readtime; /* Last read time */ - time_t resettime; /* Last reset time */ + int *fd; /* connection in use: -> local||accept */ + int ttl; /* TTL of TCP connection to the peer. */ + int fd_local; /* locally initiated connection */ + int fd_accept; /* remote initiated/accepted connection */ + char *desc; /* Description of the peer. */ + unsigned short port; /* Destination port for peer */ + char *host; /* Printable address of the peer. */ + union sockunion su; /* Sockunion address of the peer. */ + time_t uptime; /* Last Up/Down time */ + time_t readtime; /* Last read time */ + time_t resettime; /* Last reset time */ - unsigned int ifindex; /* ifindex of the BGP connection. */ - char *ifname; /* bind interface name. */ - char *update_if; - union sockunion *update_source; - struct zlog *log; - u_char version; /* Peer BGP version. */ - - union sockunion *su_local; /* Sockunion of local address. */ - union sockunion *su_remote; /* Sockunion of remote address. */ - int shared_network; /* Is this peer shared same network. */ - struct bgp_nexthop nexthop; /* Nexthop */ + unsigned int ifindex; /* ifindex of the BGP connection. */ + char *ifname; /* bind interface name. */ + char *update_if; /* interface to send from */ + union sockunion *update_source; /* sockunion to send from */ + struct zlog *log; /* log socket */ + u_char version; /* Peer BGP version. */ + + union sockunion *su_local; /* Sockunion of local address. */ + union sockunion *su_remote; /* Sockunion of remote address. */ + int shared_network; /* Is this peer shared same network. */ + struct bgp_nexthop nexthop; /* Nexthop */ /* Peer address family configuration. */ u_char afc[AFI_MAX][SAFI_MAX]; |