summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Lemon <source@isc.org>1996-05-22 08:14:59 +0000
committerTed Lemon <source@isc.org>1996-05-22 08:14:59 +0000
commit939327b9b532a5e885aacb74bed78b82d137553c (patch)
tree523c2ac7f88f3550a3232250915c6546db91b911
parentf4e348de94aadd1868e665692c337750a96d237a (diff)
downloadisc-dhcp-939327b9b532a5e885aacb74bed78b82d137553c.tar.gz
Don't print interface network name if there's no network structure
-rw-r--r--bpf.c6
-rw-r--r--common/bpf.c6
-rw-r--r--common/nit.c6
-rw-r--r--common/raw.c4
-rw-r--r--common/socket.c9
-rw-r--r--nit.c6
-rw-r--r--raw.c4
-rw-r--r--socket.c9
8 files changed, 36 insertions, 14 deletions
diff --git a/bpf.c b/bpf.c
index 7e3f6610..dd773f38 100644
--- a/bpf.c
+++ b/bpf.c
@@ -115,7 +115,8 @@ void if_register_send (info, interface)
print_hw_addr (info -> hw_address.htype,
info -> hw_address.hlen,
info -> hw_address.haddr),
- info -> shared_network -> name);
+ (info -> shared_network ?
+ info -> shared_network -> name : "unattached"));
}
#endif /* USE_BPF_SEND */
@@ -213,7 +214,8 @@ void if_register_receive (info, interface)
print_hw_addr (info -> hw_address.htype,
info -> hw_address.hlen,
info -> hw_address.haddr),
- info -> shared_network -> name);
+ (info -> shared_network ?
+ info -> shared_network -> name : "unattached"));
}
#endif /* USE_BPF_RECEIVE */
diff --git a/common/bpf.c b/common/bpf.c
index 7e3f6610..dd773f38 100644
--- a/common/bpf.c
+++ b/common/bpf.c
@@ -115,7 +115,8 @@ void if_register_send (info, interface)
print_hw_addr (info -> hw_address.htype,
info -> hw_address.hlen,
info -> hw_address.haddr),
- info -> shared_network -> name);
+ (info -> shared_network ?
+ info -> shared_network -> name : "unattached"));
}
#endif /* USE_BPF_SEND */
@@ -213,7 +214,8 @@ void if_register_receive (info, interface)
print_hw_addr (info -> hw_address.htype,
info -> hw_address.hlen,
info -> hw_address.haddr),
- info -> shared_network -> name);
+ (info -> shared_network ?
+ info -> shared_network -> name : "unattached"));
}
#endif /* USE_BPF_RECEIVE */
diff --git a/common/nit.c b/common/nit.c
index a237a81b..7937b60a 100644
--- a/common/nit.c
+++ b/common/nit.c
@@ -137,7 +137,8 @@ void if_register_send (info, interface)
print_hw_addr (info -> hw_address.htype,
info -> hw_address.hlen,
info -> hw_address.haddr),
- info -> shared_network -> name);
+ (info -> shared_network ?
+ info -> shared_network -> name : "unattached"));
}
#endif /* USE_NIT_SEND */
@@ -222,7 +223,8 @@ void if_register_receive (info, interface)
print_hw_addr (info -> hw_address.htype,
info -> hw_address.hlen,
info -> hw_address.haddr),
- info -> shared_network -> name);
+ (info -> shared_network ?
+ info -> shared_network -> name : "unattached"));
}
#endif /* USE_NIT_RECEIVE */
diff --git a/common/raw.c b/common/raw.c
index 39b4a93a..36a0d5e2 100644
--- a/common/raw.c
+++ b/common/raw.c
@@ -96,7 +96,9 @@ void if_register_send (info, interface)
info -> wfdesc = sock;
note ("Sending on Raw/%s/%s",
- info -> name, info -> shared_network -> name);
+ info -> name,
+ (info -> shared_network ?
+ info -> shared_network -> name : "unattached"));
}
size_t send_packet (interface, packet, raw, len, from, to, hto)
diff --git a/common/socket.c b/common/socket.c
index 12c72d95..bb447527 100644
--- a/common/socket.c
+++ b/common/socket.c
@@ -132,7 +132,9 @@ void if_register_send (info, interface)
info -> wfdesc = info -> rfdesc;
#endif
note ("Sending on Socket/%s/%s",
- info -> name, info -> shared_network -> name);
+ info -> name,
+ (info -> shared_network ?
+ info -> shared_network -> name : "unattached"));
}
#endif /* USE_SOCKET_SEND */
@@ -145,7 +147,10 @@ void if_register_receive (info, interface)
/* If we're using the socket API for sending and receiving,
we don't need to register this interface twice. */
info -> rfdesc = if_register_socket (info, interface);
- note ("Listening on Socket/%s", piaddr (info -> address));
+ note ("Listening on Socket/%s/%s",
+ info -> name,
+ (info -> shared_network ?
+ info -> shared_network -> name : "unattached"));
}
#endif /* USE_SOCKET_RECEIVE */
diff --git a/nit.c b/nit.c
index a237a81b..7937b60a 100644
--- a/nit.c
+++ b/nit.c
@@ -137,7 +137,8 @@ void if_register_send (info, interface)
print_hw_addr (info -> hw_address.htype,
info -> hw_address.hlen,
info -> hw_address.haddr),
- info -> shared_network -> name);
+ (info -> shared_network ?
+ info -> shared_network -> name : "unattached"));
}
#endif /* USE_NIT_SEND */
@@ -222,7 +223,8 @@ void if_register_receive (info, interface)
print_hw_addr (info -> hw_address.htype,
info -> hw_address.hlen,
info -> hw_address.haddr),
- info -> shared_network -> name);
+ (info -> shared_network ?
+ info -> shared_network -> name : "unattached"));
}
#endif /* USE_NIT_RECEIVE */
diff --git a/raw.c b/raw.c
index 39b4a93a..36a0d5e2 100644
--- a/raw.c
+++ b/raw.c
@@ -96,7 +96,9 @@ void if_register_send (info, interface)
info -> wfdesc = sock;
note ("Sending on Raw/%s/%s",
- info -> name, info -> shared_network -> name);
+ info -> name,
+ (info -> shared_network ?
+ info -> shared_network -> name : "unattached"));
}
size_t send_packet (interface, packet, raw, len, from, to, hto)
diff --git a/socket.c b/socket.c
index 12c72d95..bb447527 100644
--- a/socket.c
+++ b/socket.c
@@ -132,7 +132,9 @@ void if_register_send (info, interface)
info -> wfdesc = info -> rfdesc;
#endif
note ("Sending on Socket/%s/%s",
- info -> name, info -> shared_network -> name);
+ info -> name,
+ (info -> shared_network ?
+ info -> shared_network -> name : "unattached"));
}
#endif /* USE_SOCKET_SEND */
@@ -145,7 +147,10 @@ void if_register_receive (info, interface)
/* If we're using the socket API for sending and receiving,
we don't need to register this interface twice. */
info -> rfdesc = if_register_socket (info, interface);
- note ("Listening on Socket/%s", piaddr (info -> address));
+ note ("Listening on Socket/%s/%s",
+ info -> name,
+ (info -> shared_network ?
+ info -> shared_network -> name : "unattached"));
}
#endif /* USE_SOCKET_RECEIVE */