Diff for /libelwix/src/net.c between versions 1.18 and 1.20

version 1.18, 2018/03/15 14:51:05 version 1.20, 2019/09/24 15:49:52
Line 12  terms: Line 12  terms:
 All of the documentation and software included in the ELWIX and AITNET  All of the documentation and software included in the ELWIX and AITNET
 Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org>  Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org>
   
Copyright 2004 - 2018Copyright 2004 - 2019
         by Michael Pounov <misho@elwix.org>.  All rights reserved.          by Michael Pounov <misho@elwix.org>.  All rights reserved.
   
 Redistribution and use in source and binary forms, with or without  Redistribution and use in source and binary forms, with or without
Line 67  link_addr(const char *addr, struct sockaddr_dl *sdl) Line 67  link_addr(const char *addr, struct sockaddr_dl *sdl)
 {  {
         char *cp = sdl->sdl_data;          char *cp = sdl->sdl_data;
         char *cplim = sdl->sdl_len + (char *)sdl;          char *cplim = sdl->sdl_len + (char *)sdl;
        int byte = 0, state = NAMING, new;        int byte = 0, state = NAMING, new = 0;
   
         bzero((char *)&sdl->sdl_family, sdl->sdl_len - 1);          bzero((char *)&sdl->sdl_family, sdl->sdl_len - 1);
         sdl->sdl_family = AF_LINK;          sdl->sdl_family = AF_LINK;
Line 498  e_innet(netaddr_t * __restrict net, inaddr_t * __restr Line 498  e_innet(netaddr_t * __restrict net, inaddr_t * __restr
                 case AF_INET:                  case AF_INET:
                         for (i = 0; i < sizeof(struct in_addr); i++) {                          for (i = 0; i < sizeof(struct in_addr); i++) {
                                 ret = ((caddr_t) &net->addr.sin.sin_addr.s_addr)[i] &                                   ret = ((caddr_t) &net->addr.sin.sin_addr.s_addr)[i] & 
                                        net->mask.in.s4_addr[i];                                        net->mask.in4.s4_addr[i];
                                ret -= addr->in.s4_addr[i] & net->mask.in.s4_addr[i];                                ret -= addr->in4.s4_addr[i] & net->mask.in4.s4_addr[i];
                                 if (ret)                                  if (ret)
                                         break;                                          break;
                         }                          }

Removed from v.1.18  
changed lines
  Added in v.1.20


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>