diff --git a/proto/ospf/dbdes.c b/proto/ospf/dbdes.c index 05099b6a..6d6c3337 100644 --- a/proto/ospf/dbdes.c +++ b/proto/ospf/dbdes.c @@ -12,11 +12,11 @@ * ospf_dbdes_tx - transmit database description packet * @n: neighbor * - * Sending of database description packet is described in 10.6 of RFC 2328. - * Reception of each packet is acknoledged in sequence number of another. - * When I send a packet to neighbor I keep a copy in buffer. If neighbor - * does not reply, I don't create new packet but I just send content - * of buffer. + * Sending of a database description packet is described in 10.6 of RFC 2328. + * Reception of each packet is acknowledged in the sequence number of another. + * 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 a new packet but just send the content + * of the buffer. */ void ospf_dbdes_tx(struct ospf_neighbor *n) diff --git a/proto/ospf/iface.c b/proto/ospf/iface.c index ac34d634..2cbff6c9 100644 --- a/proto/ospf/iface.c +++ b/proto/ospf/iface.c @@ -21,9 +21,9 @@ char *ospf_it[]={ "broadcast", "nbma", "point-to-point", "virtual link" }; * @ifa: OSPF interface * @state: new state * - * Many action must be taken acording to iterface state change. New networks - * LSA must be originated, flushed, new multicast socket to listen messages for - * %ALLDROUTERS has to be opened, etc. + * Many actions must be taken according to interface state changes. New network + * LSAs must be originated, flushed, new multicast sockets to listen for messages for + * %ALLDROUTERS have to be opened, etc. */ void iface_chstate(struct ospf_iface *ifa, u8 state) diff --git a/proto/ospf/lsalib.c b/proto/ospf/lsalib.c index cf45fd4e..e79c015d 100644 --- a/proto/ospf/lsalib.c +++ b/proto/ospf/lsalib.c @@ -22,15 +22,15 @@ flush_lsa(struct top_hash_entry *en, struct ospf_area *oa) * ospf_age * @oa: ospf area * - * This function is periodicaly invoked from area_disp(). It computes new - * age of all LSAs and old (@age is higher than %LSA_MAXAGE) are flushed - * when ever possible. If some LSA originated by router itself is older - * than %LSREFRESHTIME new instance is originated. + * This function is periodicaly invoked from area_disp(). It computes the new + * age of all LSAs and old (@age is higher than %LSA_MAXAGE) LSAs are flushed + * whenever possible. If an LSA originated by the router itself is older + * than %LSREFRESHTIME a new instance is originated. * - * RFC says, that router should check checksum of every LSA to detect some - * hardware problem. BIRD does not do it to minimalize CPU utilization. + * The RFC says that a router should check the checksum of every LSA to detect + * 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. */ void diff --git a/proto/ospf/lsupd.c b/proto/ospf/lsupd.c index 2293081f..d1c20788 100644 --- a/proto/ospf/lsupd.c +++ b/proto/ospf/lsupd.c @@ -253,7 +253,7 @@ ospf_lsupd_rx(struct ospf_lsupd_packet *ps, struct proto *p, 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); return ; } diff --git a/proto/ospf/neighbor.c b/proto/ospf/neighbor.c index 52a94db4..bc4d1c37 100644 --- a/proto/ospf/neighbor.c +++ b/proto/ospf/neighbor.c @@ -27,7 +27,7 @@ const char *ospf_inm[]={ "hello received", "neighbor start", "2-way received", * @n: OSPF neighbor * @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. */ @@ -217,11 +217,11 @@ can_do_adj(struct ospf_neighbor *n) * @n: neighor * @event: actual event * - * This part implements neighbor state machine as described in 10.3 of - * RFC 2328. the only difference is that state %NEIGHBOR_ATTEMPT is not - * used. We discover neighbors on nonbroadcast networks using the - * same ways as on broadcast networks. The only difference is in - * sending hello packets. These are send to IPs listed in + * 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 + * used. We discover neighbors on nonbroadcast networks in the + * same way as on broadcast networks. The only difference is in + * sending hello packets. These are sent to IPs listed in * @ospf_iface->nbma_list . */ void @@ -322,9 +322,9 @@ ospf_neigh_sm(struct ospf_neighbor *n, int event) * bdr_election - (Backup) Designed Router election * @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 - * 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. */ void diff --git a/proto/ospf/ospf.c b/proto/ospf/ospf.c index 12037c81..ebea9519 100644 --- a/proto/ospf/ospf.c +++ b/proto/ospf/ospf.c @@ -10,60 +10,60 @@ * DOC: Open Shortest Path First (OSPF) * * 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 - * and initialisation and so on). In |packet.c|, you can find various - * functions for sending and receiving of generic OSPF packets. There are - * also routines for autentication and checksumming. File |iface.c| contains - * the interface state machine, allocation and deallocation of OSPF's + * and initialisation and so on). In |packet.c|, you will find various + * functions for sending and receiving generic OSPF packets. There are + * also routines for authentication and checksumming. File |iface.c| contains + * the interface state machine and functions for allocation and deallocation of OSPF's * interface data structures. Source |neighbor.c| includes the neighbor state - * machine and functions for election of Designed Router and Backup - * Designed router. In |hello.c|, there are routines for sending + * machine and functions for election of Designated Router and Backup + * Designated router. In |hello.c|, there are routines for sending * and receiving of hello packets as well as functions for maintaining * wait times and the inactivity timer. Files |lsreq.c|, |lsack.c|, |dbdes.c| * 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 * 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 - * 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 - * 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.). * * One instance of the protocol is able to hold LSA databases for * multiple OSPF areas, to exchange routing information between * multiple neighbors and to calculate the routing tables. The core * 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 * 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 - * kept in endianity of the CPU. + * kept in the endianity of the CPU. * * Every area has its own area_disp() which is * 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. * To every &ospf_iface, we connect one or more * &ospf_neighbor's -- a structure containing many timers and queues * for building adjacency and for exchange of routing messages. * * BIRD's OSPF implementation respects RFC2328 in every detail, but - * some of internal algorithms do differ. The RFC recommends to make a snapshot - * of the link-state database when a new adjacency is forming and send - * the database description packets based on information of this + * some of internal algorithms do differ. The RFC recommends making a snapshot + * of the link-state database when a new adjacency is forming and sending + * the database description packets based on the information in this * snapshot. The database can be quite large in some networks, so - * we rather walk through a &slist structure which allows us to - * continue even if the actual LSA we were worked with is deleted. New - * LSA's are added at the tail of this &slist. + * rather we walk through a &slist structure which allows us to + * continue even if the actual LSA we were working with is deleted. New + * LSAs are added at the tail of this &slist. * * 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 * to an identical one and it suppresses the update automatically. * 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 * 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 * @timer: it's called every @ospf_area->tick seconds * - * It ivokes aging and when @ospf_area->origrt is set to 1, start - * function for origination of router LSA and network LSA's. - * It also start routing + * It invokes aging and when @ospf_area->origrt is set to 1, start + * function for origination of router LSA and network LSAs. + * It also starts routing * table calculation when @ospf_area->calcrt is set. */ void @@ -308,11 +308,11 @@ area_disp(timer *timer) * ospf_import_control - accept or reject new route from nest's routing table * @p: current instance of protocol * @new: the new route - * @attrs: list of arttributes - * @pool: pool for alloction of attributes + * @attrs: list of attributes + * @pool: pool for allocation of attributes * - * Its quite simple. It does not accept our own routes and decision of - * import leaves to the filters. + * Its quite simple. It does not accept our own routes and leaves the decision on + * import to the filters. */ 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 * - * 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 * 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 @@ -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; -/* Temporarily down write anythink +/* Temporarily down write anything OSPF_TRACE(D_EVENTS, "Got route %I/%d %s", p->name, n->n.prefix, 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) * @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, - * password change, addition of deletion of some neighbor on + * password change, addition or deletion of some neighbor on * nonbroadcast network, cost of interface, etc. */ static int @@ -629,12 +629,12 @@ ospf_reconfigure(struct proto *p, struct proto_config *c) ifa->iface->name); } - /* AUTHETICATION */ + /* AUTHENTICATION */ if(ip1->autype!=ip2->autype) { ifa->autype=ip2->autype; OSPF_TRACE(D_EVENTS, - "Changing autentication type on interface %s", + "Changing authentication type on interface %s", ifa->iface->name); } 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)) return 0; /* One is not null */ - return 1; /* Everythink OK :-) */ + return 1; /* Everything OK :-) */ } void diff --git a/proto/ospf/packet.c b/proto/ospf/packet.c index 3543964f..5f2d6282 100644 --- a/proto/ospf/packet.c +++ b/proto/ospf/packet.c @@ -67,11 +67,11 @@ ospf_pkt_finalize(struct ospf_iface *ifa, struct ospf_packet *pkt) /** * ospf_rx_hook - * @sk: socket we recived the packet. Its ignored. + * @sk: socket we received the packet. Its ignored. * @size: size of the packet * - * This in entry point for messages from neighbors. Many checks (like - * autnetication, checksums, size) are done before packet is passed to + * This is the entry point for messages from neighbors. Many checks (like + * authentication, checksums, size) are done before the packet is passed to * non generic functions. */ int diff --git a/proto/ospf/rt.c b/proto/ospf/rt.c index b8cbbd14..7450dbc2 100644 --- a/proto/ospf/rt.c +++ b/proto/ospf/rt.c @@ -37,10 +37,10 @@ init_efib(struct fib_node *fn) * ospf_rt_spfa - calculate internal routes * @oa: OSPF area * - * Calculation of internal paths in area is described in 16.1 of RFC 2328. - * It's based on Dijkstra shortest path tree algorithmus. + * Calculation of internal paths in an area is described in 16.1 of RFC 2328. + * It's based on Dijkstra's shortest path tree algorithms. * 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(). */ void @@ -433,7 +433,7 @@ ospf_ext_spfa(struct proto_ospf *po) /* FIXME looking into inter-area */ { if(nf->metric!=LSINFINITY) 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); nf->metric=met; nf->metric2=met2; @@ -530,7 +530,7 @@ let: FIB_ITERATE_END(nftmp); } -/* Add LSA into list of candidates in Dijkstra alogithm */ +/* Add LSA into list of candidates in Dijkstra's algorithm */ void add_cand(list *l, struct top_hash_entry *en, struct top_hash_entry *par, u16 dist, struct ospf_area *oa) diff --git a/proto/ospf/topology.c b/proto/ospf/topology.c index 7b205c62..733719ab 100644 --- a/proto/ospf/topology.c +++ b/proto/ospf/topology.c @@ -253,8 +253,8 @@ originate_net_lsa_body(struct ospf_iface *ifa, u16 *length, * originate_net_lsa - originates of deletes network LSA * @ifa: interface which is LSA originated for * - * Interface counts number of adjacent neighbor. If this number is - * lower then one or interface is not in state %OSPF_IS_DR it deletes + * Interface counts number of adjacent neighbors. If this number is + * lower than one or interface is not in state %OSPF_IS_DR it deletes * and premature ages instance of network LSA for specified interface. * 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 * @e: rte * @po: current instance of OSPF * @attrs: list of extended attributes * - * If I receive message that new route is installed, I try to originate an - * external LSA. LSA header of such LSA does not contain information about - * prefix lenght, so if I have to originate multiple LSAs for route with + * If I receive a message that new route is installed, I try to originate an + * external LSA. The LSA header of such LSA does not contain information about + * 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. * - * 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. */ 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 * * 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 * 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 - * retransmision list for every neighbor. I will not test it. - * It can happen that I'll receive some strange ls ack's. + * retransmission list for every neighbor. I will not test it. + * It could happen that I'll receive some strange ls ack's. */ int