interface.
#ifndef lint
static char copyright[] =
-"$Id: bpf.c,v 1.19.2.7 1999/02/23 17:35:45 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
+"$Id: bpf.c,v 1.19.2.8 1999/02/23 22:09:56 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
info -> wfdesc = info -> rfdesc;
#endif
if (!quiet_interface_discovery)
- note ("Sending on BPF/%s/%s/%s",
+ note ("Sending on BPF/%s/%s%s%s",
info -> name,
print_hw_addr (info -> hw_address.htype,
info -> hw_address.hlen,
info -> hw_address.haddr),
+ (info -> shared_network ? "/" : ""),
(info -> shared_network ?
- info -> shared_network -> name : "unattached"));
+ info -> shared_network -> name : ""));
}
#endif /* USE_BPF_SEND */
if (ioctl (info -> rfdesc, BIOCSETF, &p) < 0)
error ("Can't install packet filter program: %m");
if (!quiet_interface_discovery)
- note ("Listening on BPF/%s/%s/%s",
+ note ("Listening on BPF/%s/%s%s%s",
info -> name,
print_hw_addr (info -> hw_address.htype,
info -> hw_address.hlen,
info -> hw_address.haddr),
+ (info -> shared_network ? "/" : ""),
(info -> shared_network ?
- info -> shared_network -> name : "unattached"));
+ info -> shared_network -> name : ""));
}
#endif /* USE_BPF_RECEIVE */
int bufp = 0;
unsigned char buf [256];
struct iovec iov [2];
+ int result;
if (!strcmp (interface -> name, "fallback"))
return send_fallback (interface, packet, raw,
#endif
if (!quiet_interface_discovery)
- note ("Sending on DLPI/%s/%s/%s",
+ note ("Sending on DLPI/%s/%s%s%s",
info -> name,
print_hw_addr (info -> hw_address.htype,
info -> hw_address.hlen,
info -> hw_address.haddr),
+ (info -> shared_network ? "/" : ""),
(info -> shared_network ?
- info -> shared_network -> name : "unattached"));
+ info -> shared_network -> name : ""));
#ifdef DLPI_FIRST_SEND_WAIT
/* See the implementation notes at the beginning of this file */
pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_CAND;
pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHWORD + 18;
pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHLIT + ENF_CAND;
- pf.Pf_Filter [pf.Pf_FilterLen++] = local_port;
+ pf.Pf_Filter [pf.Pf_FilterLen++] = htons (local_port);
#else
/*
* The packets that will be received on this file descriptor
pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_CAND;
pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHWORD + 11;
pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHLIT + ENF_CAND;
- pf.Pf_Filter [pf.Pf_FilterLen++] = local_port;
+ pf.Pf_Filter [pf.Pf_FilterLen++] = htons (local_port);
#endif
/* Install the filter... */
#endif
if (!quiet_interface_discovery)
- note ("Listening on DLPI/%s/%s/%s",
+ note ("Listening on DLPI/%s/%s%s%s",
info -> name,
print_hw_addr (info -> hw_address.htype,
info -> hw_address.hlen,
info -> hw_address.haddr),
+ (info -> shared_network ? "/" : ""),
(info -> shared_network ?
- info -> shared_network -> name : "unattached"));
+ info -> shared_network -> name : ""));
#ifdef DLPI_FIRST_SEND_WAIT
/* See the implementation notes at the beginning of this file */
#ifndef lint
static char copyright[] =
-"$Id: lpf.c,v 1.1.2.5 1999/02/23 17:35:45 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
+"$Id: lpf.c,v 1.1.2.6 1999/02/23 22:09:55 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
info -> wfdesc = info -> rfdesc;
#endif
if (!quiet_interface_discovery)
- note ("Sending on LPF/%s/%s/%s",
+ note ("Sending on LPF/%s/%s%s%s",
info -> name,
print_hw_addr (info -> hw_address.htype,
info -> hw_address.hlen,
info -> hw_address.haddr),
+ (info -> shared_network ? "/" : ""),
(info -> shared_network ?
- info -> shared_network -> name : "unattached"));
+ info -> shared_network -> name : ""));
}
#endif /* USE_LPF_SEND */
error ("Can't install packet filter program: %m");
}
if (!quiet_interface_discovery)
- note ("Listening on LPF/%s/%s/%s",
+ note ("Listening on LPF/%s/%s%s%s",
info -> name,
print_hw_addr (info -> hw_address.htype,
info -> hw_address.hlen,
info -> hw_address.haddr),
+ (info -> shared_network ? "/" : ""),
(info -> shared_network ?
- info -> shared_network -> name : "unattached"));
+ info -> shared_network -> name : ""));
}
#endif /* USE_LPF_RECEIVE */
#ifndef lint
static char copyright[] =
-"$Id: nit.c,v 1.15.2.2 1999/02/23 17:35:46 mellon Exp $ Copyright (c) 1996 The Internet Software Consortium. All rights reserved.\n";
+"$Id: nit.c,v 1.15.2.3 1999/02/23 22:09:54 mellon Exp $ Copyright (c) 1996 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
info -> wfdesc = info -> rfdesc;
#endif
if (!quiet_interface_discovery)
- note ("Sending on NIT/%s/%s",
+ note ("Sending on NIT/%s%s%s",
print_hw_addr (info -> hw_address.htype,
info -> hw_address.hlen,
info -> hw_address.haddr),
+ (info -> shared_network ? "/" : ""),
(info -> shared_network ?
- info -> shared_network -> name : "unattached"));
+ info -> shared_network -> name : ""));
}
#endif /* USE_NIT_SEND */
error ("Can't set NIT filter on %s: %m", info -> name);
if (!quiet_interface_discovery)
- note ("Listening on NIT/%s/%s",
+ note ("Listening on NIT/%s%s%s",
print_hw_addr (info -> hw_address.htype,
info -> hw_address.hlen,
info -> hw_address.haddr),
+ (info -> shared_network ? "/" : ""),
(info -> shared_network ?
- info -> shared_network -> name : "unattached"));
+ info -> shared_network -> name : ""));
}
#endif /* USE_NIT_RECEIVE */
#ifndef lint
static char copyright[] =
-"$Id: raw.c,v 1.11.2.1 1999/02/23 17:35:46 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1999 The Internet Software Consortium. All rights reserved.\n";
+"$Id: raw.c,v 1.11.2.2 1999/02/23 22:09:54 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1999 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
info -> wfdesc = sock;
if (!quiet_interface_discovery)
- note ("Sending on Raw/%s/%s",
+ note ("Sending on Raw/%s%s%s",
info -> name,
+ (info -> shared_network ? "/" : ""),
(info -> shared_network ?
- info -> shared_network -> name : "unattached"));
+ info -> shared_network -> name : ""));
}
size_t send_packet (interface, packet, raw, len, from, to, hto)
#ifndef lint
static char copyright[] =
-"$Id: socket.c,v 1.26.2.9 1999/02/23 17:35:46 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
+"$Id: socket.c,v 1.26.2.10 1999/02/23 22:09:55 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
info -> wfdesc = info -> rfdesc;
#endif
if (!quiet_interface_discovery)
- note ("Sending on Socket/%s/%s",
+ note ("Sending on Socket/%s%s%s",
info -> name,
+ (info -> shared_network ? "/" : ""),
(info -> shared_network ?
- info -> shared_network -> name : "unattached"));
-
+ info -> shared_network -> name : ""));
}
#endif /* USE_SOCKET_SEND */
we don't need to register this interface twice. */
info -> rfdesc = if_register_socket (info);
if (!quiet_interface_discovery)
- note ("Listening on Socket/%s/%s",
+ note ("Listening on Socket/%s%s%s",
info -> name,
+ (info -> shared_network ? "/" : ""),
(info -> shared_network ?
- info -> shared_network -> name : "unattached"));
+ info -> shared_network -> name : ""));
}
#endif /* USE_SOCKET_RECEIVE */
#ifndef lint
static char copyright[] =
-"$Id: upf.c,v 1.3.2.2 1999/02/23 17:35:47 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
+"$Id: upf.c,v 1.3.2.3 1999/02/23 22:09:56 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
info -> wfdesc = info -> rfdesc;
#endif
if (!quiet_interface_discovery)
- note ("Sending on UPF/%s/%s/%s",
+ note ("Sending on UPF/%s/%s%s%s",
info -> name,
print_hw_addr (info -> hw_address.htype,
info -> hw_address.hlen,
info -> hw_address.haddr),
+ (info -> shared_network ? "/" : ""),
(info -> shared_network ?
- info -> shared_network -> name : "unattached"));
+ info -> shared_network -> name : ""));
}
#endif /* USE_UPF_SEND */
if (ioctl (info -> rfdesc, EIOCSETF, &pf) < 0)
error ("Can't install packet filter program: %m");
if (!quiet_interface_discovery)
- note ("Listening on UPF/%s/%s/%s",
+ note ("Listening on UPF/%s/%s%s%s",
info -> name,
print_hw_addr (info -> hw_address.htype,
info -> hw_address.hlen,
info -> hw_address.haddr),
+ (info -> shared_network ? "/" : ""),
(info -> shared_network ?
- info -> shared_network -> name : "unattached"));
+ info -> shared_network -> name : ""));
}
#endif /* USE_UPF_RECEIVE */