Commit 405e70cd authored by ikumar's avatar ikumar

Have properly fixed the skipping of control network while forwarding

queries..
parent 27f26d99
......@@ -18,7 +18,7 @@
*
* ---------------------------
*
* $Id: forw_requests.c,v 1.9 2001-07-19 20:02:37 ikumar Exp $
* $Id: forw_requests.c,v 1.10 2001-08-02 21:21:05 ikumar Exp $
*/
#include <math.h>
......@@ -102,7 +102,10 @@ forward_request(struct ifi_info *ifihead, const struct in_pktinfo *pktinfo,
// Skip all the interfaces which are not useful
if( (ifi->ifi_flags & !IFF_UP) || (ifi->ifi_flags & IFF_LOOPBACK) ||
(strcmp(ifi->ifi_name, if_indextoname(pktinfo->ipi_ifindex, ifname)) == 0) ||
(strcmp(ifi->ifi_name,"fxp4")==0) )
/*(strcmp(ifi->ifi_name,"fxp4")==0)*/
(strncmp(inet_ntoa(((struct sockaddr_in *)(ifi->ifi_addr))->sin_addr),"155.101.132",11)==0)
)
{
continue;
}
......
......@@ -188,6 +188,18 @@ not_in_node_list(u_char *mac_addr)
return 1;
}
/* Add link function adds a link to the links_list data structure which is the
* list of all the links in the topology.
* - It ignores the link if its a duplicate to any of the existing link
* - If one of the interface is common to two links then the links are part
* of a LAN. Since the query is forwarded on the LAN from a single interface
* of a node hence for a LAN there is just one common interface. This
* interface is seperately (pointA of link structure) for making the
* comparisions simple.
* The rest of the interfaces on the LAN is stored as a link list of nodes and
* pointed by the "lan_if_list" in the link structure.
*/
void
add_link(struct topd_nbor *p)
......
......@@ -18,7 +18,7 @@
*
* ---------------------------
*
* $Id: serv_listen.c,v 1.9 2001-07-19 20:02:37 ikumar Exp $
* $Id: serv_listen.c,v 1.10 2001-08-02 21:21:05 ikumar Exp $
*/
#include <math.h>
......@@ -220,7 +220,7 @@ serv_listen(int servSockFd, struct sockaddr *pcliaddr, socklen_t clilen)
FD_SET(servSockFd,&readFd);
start = tod();
state = Q_LISTEN;
state = Q_LISTEN; /* Intially, just wait for query */
while(1)
{
tempReadFd = readFd;
......@@ -314,7 +314,7 @@ serv_listen(int servSockFd, struct sockaddr *pcliaddr, socklen_t clilen)
}
else
{
printf("Error: Stray packet... earlier enquiry.\n");
printf("Error: Stray packet... earlier enquiry may be.\n");
}
if(class == NEW)
printf("Received a new query packet!\n");
......@@ -448,7 +448,7 @@ serv_listen(int servSockFd, struct sockaddr *pcliaddr, socklen_t clilen)
}
}
if(state == QR_LISTEN)
if(state == QR_LISTEN) /* Waiting for Querry as well as Replies */
{
end=tod();
/* Since I have come out of the select so lets calculate how much time
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment