0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 09:41:54 +00:00

Many spelling mistakes fixed.

Thanks you Harry Moyes.
This commit is contained in:
Ondrej Filip 2003-08-23 10:42:41 +00:00
parent c197d44e17
commit baa5dd6ccc
9 changed files with 81 additions and 81 deletions

View File

@ -12,11 +12,11 @@
* ospf_dbdes_tx - transmit database description packet * ospf_dbdes_tx - transmit database description packet
* @n: neighbor * @n: neighbor
* *
* Sending of database description packet is described in 10.6 of RFC 2328. * Sending of a database description packet is described in 10.6 of RFC 2328.
* Reception of each packet is acknoledged in sequence number of another. * Reception of each packet is acknowledged in the sequence number of another.
* When I send a packet to neighbor I keep a copy in buffer. If neighbor * When I send a packet to a neighbor I keep a copy in a buffer. If the neighbor
* does not reply, I don't create new packet but I just send content * does not reply, I don't create a new packet but just send the content
* of buffer. * of the buffer.
*/ */
void void
ospf_dbdes_tx(struct ospf_neighbor *n) ospf_dbdes_tx(struct ospf_neighbor *n)

View File

@ -21,9 +21,9 @@ char *ospf_it[]={ "broadcast", "nbma", "point-to-point", "virtual link" };
* @ifa: OSPF interface * @ifa: OSPF interface
* @state: new state * @state: new state
* *
* Many action must be taken acording to iterface state change. New networks * Many actions must be taken according to interface state changes. New network
* LSA must be originated, flushed, new multicast socket to listen messages for * LSAs must be originated, flushed, new multicast sockets to listen for messages for
* %ALLDROUTERS has to be opened, etc. * %ALLDROUTERS have to be opened, etc.
*/ */
void void
iface_chstate(struct ospf_iface *ifa, u8 state) iface_chstate(struct ospf_iface *ifa, u8 state)

View File

@ -22,15 +22,15 @@ flush_lsa(struct top_hash_entry *en, struct ospf_area *oa)
* ospf_age * ospf_age
* @oa: ospf area * @oa: ospf area
* *
* This function is periodicaly invoked from area_disp(). It computes new * This function is periodicaly invoked from area_disp(). It computes the new
* age of all LSAs and old (@age is higher than %LSA_MAXAGE) are flushed * age of all LSAs and old (@age is higher than %LSA_MAXAGE) LSAs are flushed
* when ever possible. If some LSA originated by router itself is older * whenever possible. If an LSA originated by the router itself is older
* than %LSREFRESHTIME new instance is originated. * than %LSREFRESHTIME a new instance is originated.
* *
* RFC says, that router should check checksum of every LSA to detect some * The RFC says that a router should check the checksum of every LSA to detect
* hardware problem. BIRD does not do it to minimalize CPU utilization. * hardware problems. BIRD does not do this to minimalize CPU utilization.
* *
* If routing table calculation is scheduled, it also invalidates old routing * If routing table calculation is scheduled, it also invalidates the old routing
* table calculation results. * table calculation results.
*/ */
void void

View File

@ -253,7 +253,7 @@ ospf_lsupd_rx(struct ospf_lsupd_packet *ps, struct proto *p,
if((n=find_neigh(ifa, nrid))==NULL) if((n=find_neigh(ifa, nrid))==NULL)
{ {
OSPF_TRACE(D_PACKETS, "Received lsupd from unknown neigbor! (%I)", OSPF_TRACE(D_PACKETS, "Received lsupd from unknown neighbor! (%I)",
nrid); nrid);
return ; return ;
} }

View File

@ -27,7 +27,7 @@ const char *ospf_inm[]={ "hello received", "neighbor start", "2-way received",
* @n: OSPF neighbor * @n: OSPF neighbor
* @state: new state * @state: new state
* *
* Many actions has to be taken acording to state change of neighbor. It * Many actions have to be taken acording to a change of state of a neighbor. It
* starts rxmt timers, call interface state machine etc. * starts rxmt timers, call interface state machine etc.
*/ */
@ -217,11 +217,11 @@ can_do_adj(struct ospf_neighbor *n)
* @n: neighor * @n: neighor
* @event: actual event * @event: actual event
* *
* This part implements neighbor state machine as described in 10.3 of * This part implements the neighbor state machine as described in 10.3 of
* RFC 2328. the only difference is that state %NEIGHBOR_ATTEMPT is not * RFC 2328. The only difference is that state %NEIGHBOR_ATTEMPT is not
* used. We discover neighbors on nonbroadcast networks using the * used. We discover neighbors on nonbroadcast networks in the
* same ways as on broadcast networks. The only difference is in * same way as on broadcast networks. The only difference is in
* sending hello packets. These are send to IPs listed in * sending hello packets. These are sent to IPs listed in
* @ospf_iface->nbma_list . * @ospf_iface->nbma_list .
*/ */
void void
@ -322,9 +322,9 @@ ospf_neigh_sm(struct ospf_neighbor *n, int event)
* bdr_election - (Backup) Designed Router election * bdr_election - (Backup) Designed Router election
* @ifa: actual interface * @ifa: actual interface
* *
* When wait time fires, it time to elect (Backup) Designed Router. * When the wait timer fires, it is time to elect (Backup) Designated Router.
* Structure describing me is added to this list so every electing router * Structure describing me is added to this list so every electing router
* has the same list. Backup Designed Router is elected before Designed * has the same list. Backup Designated Router is elected before Designated
* Router. This process is described in 9.4 of RFC 2328. * Router. This process is described in 9.4 of RFC 2328.
*/ */
void void

View File

@ -10,60 +10,60 @@
* DOC: Open Shortest Path First (OSPF) * DOC: Open Shortest Path First (OSPF)
* *
* The OSPF protocol is quite complicated and its complex implemenation is * The OSPF protocol is quite complicated and its complex implemenation is
* split to many files. In |ospf.c|, you can find mostly interface * split to many files. In |ospf.c|, you will find mainly the interface
* for communication with the core (e.g., reconfiguration hooks, shutdown * for communication with the core (e.g., reconfiguration hooks, shutdown
* and initialisation and so on). In |packet.c|, you can find various * and initialisation and so on). In |packet.c|, you will find various
* functions for sending and receiving of generic OSPF packets. There are * functions for sending and receiving generic OSPF packets. There are
* also routines for autentication and checksumming. File |iface.c| contains * also routines for authentication and checksumming. File |iface.c| contains
* the interface state machine, allocation and deallocation of OSPF's * the interface state machine and functions for allocation and deallocation of OSPF's
* interface data structures. Source |neighbor.c| includes the neighbor state * interface data structures. Source |neighbor.c| includes the neighbor state
* machine and functions for election of Designed Router and Backup * machine and functions for election of Designated Router and Backup
* Designed router. In |hello.c|, there are routines for sending * Designated router. In |hello.c|, there are routines for sending
* and receiving of hello packets as well as functions for maintaining * and receiving of hello packets as well as functions for maintaining
* wait times and the inactivity timer. Files |lsreq.c|, |lsack.c|, |dbdes.c| * wait times and the inactivity timer. Files |lsreq.c|, |lsack.c|, |dbdes.c|
* contain functions for sending and receiving of link-state requests, * contain functions for sending and receiving of link-state requests,
* link-state acknoledges and database descriptions respectively. * link-state acknowledgements and database descriptions respectively.
* In |lsupd.c|, there are functions for sending and receiving * In |lsupd.c|, there are functions for sending and receiving
* of link-state updates and also the flooding algorithm. Source |topology.c| is * of link-state updates and also the flooding algorithm. Source |topology.c| is
* a place where routines for searching LSA's in the link-state database, * a place where routines for searching LSAs in the link-state database,
* adding and deleting them reside, there also are functions for originating * adding and deleting them reside, there also are functions for originating
* of various types of LSA's (router LSA, net LSA, external LSA). File |rt.c| * of various types of LSAs (router LSA, net LSA, external LSA). File |rt.c|
* contains routines for calculating the routing table. |lsalib.c| is a set * contains routines for calculating the routing table. |lsalib.c| is a set
* of various functions for working with the LSA's (endianity conversions, * of various functions for working with the LSAs (endianity conversions,
* calculation of checksum etc.). * calculation of checksum etc.).
* *
* One instance of the protocol is able to hold LSA databases for * One instance of the protocol is able to hold LSA databases for
* multiple OSPF areas, to exchange routing information between * multiple OSPF areas, to exchange routing information between
* multiple neighbors and to calculate the routing tables. The core * multiple neighbors and to calculate the routing tables. The core
* structure is &proto_ospf to which multiple &ospf_area and * structure is &proto_ospf to which multiple &ospf_area and
* &ospf_iface structures are connected. To &ospf_area is also connected * &ospf_iface structures are connected. &ospf_area is also connected to
* &top_hash_graph which is a dynamic hashing structure that * &top_hash_graph which is a dynamic hashing structure that
* describes the link-state database. It allows fast search, addition * describes the link-state database. It allows fast search, addition
* and deletion. Each LSA is kept in two pieces: header and body. Both of them are * and deletion. Each LSA is kept in two pieces: header and body. Both of them are
* kept in endianity of the CPU. * kept in the endianity of the CPU.
* *
* Every area has its own area_disp() which is * Every area has its own area_disp() which is
* responsible for late originating of router LSA, calculating * responsible for late originating of router LSA, calculating
* of the routing table and it also ages and flushes the LSA's. This * of the routing table and it also ages and flushes the LSAs. This
* function is called in regular intervals. * function is called in regular intervals.
* To every &ospf_iface, we connect one or more * To every &ospf_iface, we connect one or more
* &ospf_neighbor's -- a structure containing many timers and queues * &ospf_neighbor's -- a structure containing many timers and queues
* for building adjacency and for exchange of routing messages. * for building adjacency and for exchange of routing messages.
* *
* BIRD's OSPF implementation respects RFC2328 in every detail, but * BIRD's OSPF implementation respects RFC2328 in every detail, but
* some of internal algorithms do differ. The RFC recommends to make a snapshot * some of internal algorithms do differ. The RFC recommends making a snapshot
* of the link-state database when a new adjacency is forming and send * of the link-state database when a new adjacency is forming and sending
* the database description packets based on information of this * the database description packets based on the information in this
* snapshot. The database can be quite large in some networks, so * snapshot. The database can be quite large in some networks, so
* we rather walk through a &slist structure which allows us to * rather we walk through a &slist structure which allows us to
* continue even if the actual LSA we were worked with is deleted. New * continue even if the actual LSA we were working with is deleted. New
* LSA's are added at the tail of this &slist. * LSAs are added at the tail of this &slist.
* *
* We also don't keep a separate OSPF routing table, because the core * We also don't keep a separate OSPF routing table, because the core
* helps us by being able to recognize when a route is updated * helps us by being able to recognize when a route is updated
* to an identical one and it suppresses the update automatically. * to an identical one and it suppresses the update automatically.
* Due to this, we can flush all the routes we've recalculated and * Due to this, we can flush all the routes we've recalculated and
* also those we're deleted to the core's routing table and the * also those we've deleted to the core's routing table and the
* core will take care of the rest. This simplifies the process * core will take care of the rest. This simplifies the process
* and conserves memory. * and conserves memory.
*/ */
@ -270,13 +270,13 @@ schedule_rtcalc(struct ospf_area *oa)
} }
/** /**
* area_disp - invokes link-state database aging, originating of * area_disp - invokes link-state database aging, origination of
* router LSA and routing table calculation * router LSA and routing table calculation
* @timer: it's called every @ospf_area->tick seconds * @timer: it's called every @ospf_area->tick seconds
* *
* It ivokes aging and when @ospf_area->origrt is set to 1, start * It invokes aging and when @ospf_area->origrt is set to 1, start
* function for origination of router LSA and network LSA's. * function for origination of router LSA and network LSAs.
* It also start routing * It also starts routing
* table calculation when @ospf_area->calcrt is set. * table calculation when @ospf_area->calcrt is set.
*/ */
void void
@ -308,11 +308,11 @@ area_disp(timer *timer)
* ospf_import_control - accept or reject new route from nest's routing table * ospf_import_control - accept or reject new route from nest's routing table
* @p: current instance of protocol * @p: current instance of protocol
* @new: the new route * @new: the new route
* @attrs: list of arttributes * @attrs: list of attributes
* @pool: pool for alloction of attributes * @pool: pool for allocation of attributes
* *
* Its quite simple. It does not accept our own routes and decision of * Its quite simple. It does not accept our own routes and leaves the decision on
* import leaves to the filters. * import to the filters.
*/ */
int int
@ -341,13 +341,13 @@ ospf_store_tmp_attrs(struct rte *rt, struct ea_list *attrs)
} }
/** /**
* ospf_shutdown - Finnish of OSPF instance * ospf_shutdown - Finish of OSPF instance
* @p: current instance of protocol * @p: current instance of protocol
* *
* RFC does not define any action that should be taken befor router * RFC does not define any action that should be taken before router
* shutdown. To make my neighbors react as fast as possible, I send * shutdown. To make my neighbors react as fast as possible, I send
* them hello packet with empty neighbor list. They should start * them hello packet with empty neighbor list. They should start
* theirs neighbor state machine with event %NEIGHBOR_1WAY. * their neighbor state machine with event %NEIGHBOR_1WAY.
*/ */
static int static int
@ -374,7 +374,7 @@ ospf_rt_notify(struct proto *p, net *n, rte *new, rte *old, ea_list *attrs)
{ {
struct proto_ospf *po=(struct proto_ospf *)p; struct proto_ospf *po=(struct proto_ospf *)p;
/* Temporarily down write anythink /* Temporarily down write anything
OSPF_TRACE(D_EVENTS, "Got route %I/%d %s", p->name, n->n.prefix, OSPF_TRACE(D_EVENTS, "Got route %I/%d %s", p->name, n->n.prefix,
n->n.pxlen, new ? "up" : "down"); n->n.pxlen, new ? "up" : "down");
*/ */
@ -481,9 +481,9 @@ ospf_patt_compare(struct ospf_iface_patt *a, struct ospf_iface_patt *b)
* @p: current instance of protocol (with old configuration) * @p: current instance of protocol (with old configuration)
* @c: new configuration requested by user * @c: new configuration requested by user
* *
* This hook tries to be a little bit inteligent. Instance of OSPF * This hook tries to be a little bit intelligent. Instance of OSPF
* will survive change of many constants like hello interval, * will survive change of many constants like hello interval,
* password change, addition of deletion of some neighbor on * password change, addition or deletion of some neighbor on
* nonbroadcast network, cost of interface, etc. * nonbroadcast network, cost of interface, etc.
*/ */
static int static int
@ -629,12 +629,12 @@ ospf_reconfigure(struct proto *p, struct proto_config *c)
ifa->iface->name); ifa->iface->name);
} }
/* AUTHETICATION */ /* AUTHENTICATION */
if(ip1->autype!=ip2->autype) if(ip1->autype!=ip2->autype)
{ {
ifa->autype=ip2->autype; ifa->autype=ip2->autype;
OSPF_TRACE(D_EVENTS, OSPF_TRACE(D_EVENTS,
"Changing autentication type on interface %s", "Changing authentication type on interface %s",
ifa->iface->name); ifa->iface->name);
} }
if(strncmp(ip1->password,ip2->password,8)!=0) if(strncmp(ip1->password,ip2->password,8)!=0)
@ -739,7 +739,7 @@ ospf_reconfigure(struct proto *p, struct proto_config *c)
if(((NODE (ac1))->next)!=((NODE (ac2))->next)) if(((NODE (ac1))->next)!=((NODE (ac2))->next))
return 0; /* One is not null */ return 0; /* One is not null */
return 1; /* Everythink OK :-) */ return 1; /* Everything OK :-) */
} }
void void

View File

@ -67,11 +67,11 @@ ospf_pkt_finalize(struct ospf_iface *ifa, struct ospf_packet *pkt)
/** /**
* ospf_rx_hook * ospf_rx_hook
* @sk: socket we recived the packet. Its ignored. * @sk: socket we received the packet. Its ignored.
* @size: size of the packet * @size: size of the packet
* *
* This in entry point for messages from neighbors. Many checks (like * This is the entry point for messages from neighbors. Many checks (like
* autnetication, checksums, size) are done before packet is passed to * authentication, checksums, size) are done before the packet is passed to
* non generic functions. * non generic functions.
*/ */
int int

View File

@ -37,10 +37,10 @@ init_efib(struct fib_node *fn)
* ospf_rt_spfa - calculate internal routes * ospf_rt_spfa - calculate internal routes
* @oa: OSPF area * @oa: OSPF area
* *
* Calculation of internal paths in area is described in 16.1 of RFC 2328. * Calculation of internal paths in an area is described in 16.1 of RFC 2328.
* It's based on Dijkstra shortest path tree algorithmus. * It's based on Dijkstra's shortest path tree algorithms.
* RFC recommends to add ASBR routers into routing table. I don't do this * RFC recommends to add ASBR routers into routing table. I don't do this
* and latter parts of routing table calculation looks directly into LSA * and latter parts of routing table calculation look directly into LSA
* Database. This function is invoked from area_disp(). * Database. This function is invoked from area_disp().
*/ */
void void
@ -433,7 +433,7 @@ ospf_ext_spfa(struct proto_ospf *po) /* FIXME looking into inter-area */
{ {
if(nf->metric!=LSINFINITY) if(nf->metric!=LSINFINITY)
OSPF_TRACE(D_EVENTS, OSPF_TRACE(D_EVENTS,
"Rewritting %I/%d met=%d, met2=%d, nmet=%d, nmet2=%d", "Rewriting %I/%d met=%d, met2=%d, nmet=%d, nmet2=%d",
ip, mlen, nf->metric, nf->metric2, met, met2); ip, mlen, nf->metric, nf->metric2, met, met2);
nf->metric=met; nf->metric=met;
nf->metric2=met2; nf->metric2=met2;
@ -530,7 +530,7 @@ let:
FIB_ITERATE_END(nftmp); FIB_ITERATE_END(nftmp);
} }
/* Add LSA into list of candidates in Dijkstra alogithm */ /* Add LSA into list of candidates in Dijkstra's algorithm */
void void
add_cand(list *l, struct top_hash_entry *en, struct top_hash_entry *par, add_cand(list *l, struct top_hash_entry *en, struct top_hash_entry *par,
u16 dist, struct ospf_area *oa) u16 dist, struct ospf_area *oa)

View File

@ -253,8 +253,8 @@ originate_net_lsa_body(struct ospf_iface *ifa, u16 *length,
* originate_net_lsa - originates of deletes network LSA * originate_net_lsa - originates of deletes network LSA
* @ifa: interface which is LSA originated for * @ifa: interface which is LSA originated for
* *
* Interface counts number of adjacent neighbor. If this number is * Interface counts number of adjacent neighbors. If this number is
* lower then one or interface is not in state %OSPF_IS_DR it deletes * lower than one or interface is not in state %OSPF_IS_DR it deletes
* and premature ages instance of network LSA for specified interface. * and premature ages instance of network LSA for specified interface.
* In other case, new instance of network LSA is originated. * In other case, new instance of network LSA is originated.
*/ */
@ -355,18 +355,18 @@ originate_ext_lsa_body(net *n, rte *e, struct proto_ospf *po, struct ea_list *at
} }
/** /**
* originate_ext_lsa - new route recived from nest and filters * originate_ext_lsa - new route received from nest and filters
* @n: network prefix and mask * @n: network prefix and mask
* @e: rte * @e: rte
* @po: current instance of OSPF * @po: current instance of OSPF
* @attrs: list of extended attributes * @attrs: list of extended attributes
* *
* If I receive message that new route is installed, I try to originate an * If I receive a message that new route is installed, I try to originate an
* external LSA. LSA header of such LSA does not contain information about * external LSA. The LSA header of such LSA does not contain information about
* prefix lenght, so if I have to originate multiple LSAs for route with * prefix length, so if I have to originate multiple LSAs for route with
* different prefixes I try to increment prefix id to find a "free" one. * different prefixes I try to increment prefix id to find a "free" one.
* *
* The function also set flag ebit. If it's first time, the new router lsa * The function also sets flag ebit. If it's the first time, the new router lsa
* origination is necessary. * origination is necessary.
*/ */
void void
@ -483,7 +483,7 @@ return (ospf_top_hash_u32(lsaid) + ospf_top_hash_u32((type==LSA_T_NET) ? lsaid :
* @p: current instance of OSPF * @p: current instance of OSPF
* *
* This dynamically hashed structure is often used for keeping LSAs. Mainly * This dynamically hashed structure is often used for keeping LSAs. Mainly
* its used in @ospf_area structute. * its used in @ospf_area structure.
*/ */
struct top_graph * struct top_graph *
ospf_top_new(struct proto_ospf *p) ospf_top_new(struct proto_ospf *p)
@ -634,11 +634,11 @@ ospf_top_dump(struct top_graph *f, struct proto *p)
} }
} }
/* This is very uneficient, please don't call it often */ /* This is very inefficient, please don't call it often */
/* I should also test for every LSA if it's in some link state /* I should also test for every LSA if it's in some link state
* retransmision list for every neighbor. I will not test it. * retransmission list for every neighbor. I will not test it.
* It can happen that I'll receive some strange ls ack's. * It could happen that I'll receive some strange ls ack's.
*/ */
int int