}
/* Encapsulate the packet for sending */
- if_encap(ifm->m_data, ifm->m_len);
+ if_encap((uint8_t *)ifm->m_data, ifm->m_len);
m_free(ifm);
struct socket *so;
{
struct sockaddr_in addr;
- int addrlen = sizeof(struct sockaddr_in);
+ socklen_t addrlen = sizeof(struct sockaddr_in);
DEBUG_CALL("sorecvfrom");
DEBUG_ARG("so = %lx", (long)so);
{
struct sockaddr_in addr;
struct socket *so;
- int s, addrlen = sizeof(addr), opt = 1;
+ int s, opt = 1;
+ socklen_t addrlen = sizeof(addr);
DEBUG_CALL("solisten");
DEBUG_ARG("port = %d", port);
if ((so->so_faddr.s_addr & htonl(0x000000ff)) == htonl(0xff))
saddr.sin_addr.s_addr = alias_addr.s_addr;
else if (addr->sin_addr.s_addr == loopback_addr.s_addr ||
- ((so->so_faddr.s_addr & htonl(CTL_DNS)) == htonl(CTL_DNS)))
+ (ntohl(so->so_faddr.s_addr) & 0xff) != CTL_ALIAS)
saddr.sin_addr.s_addr = so->so_faddr.s_addr;
}
daddr.sin_addr = so->so_laddr;
udp_emu(struct socket *so, struct mbuf *m)
{
struct sockaddr_in addr;
- int addrlen = sizeof(addr);
+ socklen_t addrlen = sizeof(addr);
#ifdef EMULATE_TALK
CTL_MSG_OLD *omsg;
CTL_MSG *nmsg;
{
struct sockaddr_in addr;
struct socket *so;
- int addrlen = sizeof(struct sockaddr_in), opt = 1;
+ socklen_t addrlen = sizeof(struct sockaddr_in), opt = 1;
if ((so = socreate()) == NULL) {
free(so);