class Neighbour

Neighbour specific information. More...

 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Types

Public Methods

Public Static Methods

Public Members


Detailed Description

Neighbour specific information.

enum State { Down = 1, Attempt = 2, Init = 3, TwoWay = 4, ExStart = 5, Exchange = 6, Loading = 7, Full = 8 }

State

The ordering is important (used in the DR and BDR election).

typedef XorpCallback0<bool>::RefPtr RxmtCallback

RxmtCallback

 Neighbour (Ospf<A>& ospf, Peer<A>& peer, OspfTypes::RouterID router_id, A neighbour_address, OspfTypes::NeighbourID neighbourid, OspfTypes::LinkType linktype, State state = Init)

Neighbour

We start in Init not Down state as typically this class is created on demand when a hello packet arrives.

 ~Neighbour ()

~Neighbour

OspfTypes::NeighbourID  get_neighbour_id ()

get_neighbour_id

[const]

Get neighbour ID our internal ID for each neighbour.

OspfTypes::RouterID  get_router_id ()

get_router_id

[const]

Neighbours router ID.

A  get_neighbour_address ()

get_neighbour_address

[const]

Neighbours source address.

OspfTypes::RouterID  get_candidate_id ()

get_candidate_id

[const]

Returns: the value that should be used for DR or BDR for this neighbour In OSPFv2 its the source address of the interface. In OSPFv3 its the router ID.

State  get_state ()

get_state

[const]

Get the state of this neighbour.

Auth&  get_auth_handler ()

get_auth_handler

Return the authentication handler.

bool  is_neighbour_DR ()

is_neighbour_DR

[const]

Returns: true if this routers neighbour is the DR.

bool  is_neighbour_DR_or_BDR ()

is_neighbour_DR_or_BDR

[const]

Returns: true if this routers neighbour is the DR or BDR.

bool  announce_in_hello_packet ()

announce_in_hello_packet

[const]

Should this neighbour be announced in hello packet.

Returns: true if it should.

HelloPacketget_hello_packet ()

get_hello_packet

Get a copy of the last hello packet that was received.

HelloPacketget_hello_packet ()

get_hello_packet

[const]

Get a copy of the last hello packet that was received.

void  event_hello_received (HelloPacket *hello)

event_hello_received

void  data_description_received (DataDescriptionPacket *dd)

data_description_received

void  link_state_request_received (LinkStateRequestPacket *lsrp)

link_state_request_received

void  link_state_update_received (LinkStateUpdatePacket *lsup)

link_state_update_received

void  link_state_acknowledgement_received (LinkStateAcknowledgementPacket *lsap)

link_state_acknowledgement_received

bool  send_lsa (Lsa::LsaRef lsar)

send_lsa

Send this LSA directly to the neighbour. Do not place on retransmission list.

Returns: true on success

bool  queue_lsa (PeerID peerid, OspfTypes::NeighbourID nid, Lsa::LsaRef lsar, bool& multicast_on_peer)

queue_lsa

Queue an LSA for transmission.

Parameters:

peerthe LSA arrived on.
nidthe LSA arrived on.
lsarthe lsa
multicast_on_peerDid this LSA get multicast on this peer.

Returns: true on success.

bool  push_lsas ()

push_lsas

Send (push) any queued LSAs.

bool  on_link_state_request_list (Lsa::LsaRef lsar)

on_link_state_request_list

[const]

Is this LSA on this neighbours link state request list.

Returns: true if it is.

OspfTypes::LinkType  get_linktype ()

get_linktype

[const]

Returns: the link type.

bool  send_ack (list<Lsa_header>& ack, bool direct, bool& multicast_on_peer)

send_ack

Send acknowledgement.

Parameters:

acklist of acknowledgements.
directif true send directly to the neighbour.
multicast_on_peerset to true if the ack was multicast. Only if direct is false is it possible for the packet to be multicast.

Returns: true if an acknowledgement is sent.

void  event_kill_neighbour ()

event_kill_neighbour

void  event_adj_ok ()

event_adj_ok

void  event_bad_link_state_request ()

event_bad_link_state_request

string  pp_state (State is)

pp_state

[static]

Pretty print the neighbour state.

bool  get_neighbour_info (NeighbourInfo& ninfo)

get_neighbour_info

[const]

Get state information about this neighbour.

Parameters:

ninfoif neighbour is found its information.
string  str ()

str

static OspfTypes::NeighbourID _ticket

_ticket


Generated by: pavlin on possum.icir.org on Wed Aug 2 15:36:38 2006, using kdoc $.