Ignore:
Timestamp:
Apr 14, 2005, 3:09:06 PM (15 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
44557f8
Parents:
8d740cf1
Message:

Partial updates from FreeBSD.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libnetworking/netinet/in.h

    r8d740cf1 ref1f80e  
    235235 * is done according to subnet mask, not the masks here.
    236236 */
    237 #define IN_CLASSA(i)            (((long)(i) & 0x80000000) == 0)
     237#define IN_CLASSA(i)            (((u_int32_t)(i) & 0x80000000) == 0)
    238238#define IN_CLASSA_NET           0xff000000
    239239#define IN_CLASSA_NSHIFT        24
     
    241241#define IN_CLASSA_MAX           128
    242242
    243 #define IN_CLASSB(i)            (((long)(i) & 0xc0000000) == 0x80000000)
     243#define IN_CLASSB(i)            (((u_int32_t)(i) & 0xc0000000) == 0x80000000)
    244244#define IN_CLASSB_NET           0xffff0000
    245245#define IN_CLASSB_NSHIFT        16
     
    247247#define IN_CLASSB_MAX           65536
    248248
    249 #define IN_CLASSC(i)            (((long)(i) & 0xe0000000) == 0xc0000000)
     249#define IN_CLASSC(i)            (((u_int32_t)(i) & 0xe0000000) == 0xc0000000)
    250250#define IN_CLASSC_NET           0xffffff00
    251251#define IN_CLASSC_NSHIFT        8
    252252#define IN_CLASSC_HOST          0x000000ff
    253253
    254 #define IN_CLASSD(i)            (((long)(i) & 0xf0000000) == 0xe0000000)
     254#define IN_CLASSD(i)            (((u_int32_t)(i) & 0xf0000000) == 0xe0000000)
    255255#define IN_CLASSD_NET           0xf0000000      /* These ones aren't really */
    256256#define IN_CLASSD_NSHIFT        28              /* net and host fields, but */
     
    258258#define IN_MULTICAST(i)         IN_CLASSD(i)
    259259
    260 #define IN_EXPERIMENTAL(i)      (((long)(i) & 0xf0000000) == 0xf0000000)
    261 #define IN_BADCLASS(i)          (((long)(i) & 0xf0000000) == 0xf0000000)
     260#define IN_EXPERIMENTAL(i)      (((u_int32_t)(i) & 0xf0000000) == 0xf0000000)
     261#define IN_BADCLASS(i)          (((u_int32_t)(i) & 0xf0000000) == 0xf0000000)
    262262
    263263#define INADDR_ANY              (u_long)0x00000000
Note: See TracChangeset for help on using the changeset viewer.