Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
405e70cd
Commit
405e70cd
authored
Aug 02, 2001
by
ikumar
Browse files
Have properly fixed the skipping of control network while forwarding
queries..
parent
27f26d99
Changes
3
Show whitespace changes
Inline
Side-by-side
discvr/forw_requests.c
View file @
405e70cd
...
...
@@ -18,7 +18,7 @@
*
* ---------------------------
*
* $Id: forw_requests.c,v 1.
9
2001-0
7-19 20:02:37
ikumar Exp $
* $Id: forw_requests.c,v 1.
10
2001-0
8-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
;
}
...
...
discvr/generate_namfile.c
View file @
405e70cd
...
...
@@ -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
)
...
...
discvr/serv_listen.c
View file @
405e70cd
...
...
@@ -18,7 +18,7 @@
*
* ---------------------------
*
* $Id: serv_listen.c,v 1.
9
2001-0
7-19 20:02:37
ikumar Exp $
* $Id: serv_listen.c,v 1.
10
2001-0
8-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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment