Changeset d74c13b in rtems


Ignore:
Timestamp:
Sep 16, 2005, 6:11:06 AM (14 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
bc100edf
Parents:
4e7d39ef
Message:

Partial update from FreeBSD.

Location:
cpukit/libnetworking
Files:
2 edited

Legend:

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

    r4e7d39ef rd74c13b  
    2828 *
    2929 *      @(#)in.h        8.3 (Berkeley) 1/3/94
    30  * $FreeBSD: src/sys/netinet/in.h,v 1.90 2005/02/22 13:04:03 glebius Exp $
     30 * $FreeBSD: src/sys/netinet/in.h,v 1.91 2005/08/22 16:13:07 andre Exp $
    3131 */
    3232 
     
    6060#endif
    6161
    62 /* Internet address (a structure for historical reasons) */
     62/* Internet address (a structure for historical reasons). */
    6363#ifndef _STRUCT_IN_ADDR_DECLARED
    6464struct in_addr {
     
    290290#define IN_BADCLASS(i)          (((u_int32_t)(i) & 0xf0000000) == 0xf0000000)
    291291
     292#define INADDR_LOOPBACK         (u_int32_t)0x7f000001
    292293#ifndef _KERNEL
    293294#define INADDR_NONE             0xffffffff              /* -1 return */
    294295#endif
    295296
    296 #define INADDR_UNSPEC_GROUP     (u_long)0xe0000000      /* 224.0.0.0 */
    297 #define INADDR_ALLHOSTS_GROUP   (u_long)0xe0000001      /* 224.0.0.1 */
    298 #define INADDR_ALLRTRS_GROUP    (u_long)0xe0000002      /* 224.0.0.2 */
    299 #define INADDR_MAX_LOCAL_GROUP  (u_long)0xe00000ff      /* 224.0.0.255 */
     297#define INADDR_UNSPEC_GROUP     (u_int32_t)0xe0000000   /* 224.0.0.0 */
     298#define INADDR_ALLHOSTS_GROUP   (u_int32_t)0xe0000001   /* 224.0.0.1 */
     299#define INADDR_ALLRTRS_GROUP    (u_int32_t)0xe0000002   /* 224.0.0.2 */
     300#define INADDR_MAX_LOCAL_GROUP  (u_int32_t)0xe00000ff   /* 224.0.0.255 */
    300301
    301302#define IN_LOOPBACKNET          127                     /* official! */
    302 #ifndef INADDR_LOOPBACK
    303 #define INADDR_LOOPBACK         (u_long)0x7F000001      /* 127.0.0.1 */
    304 #endif
    305303
    306304/*
     
    445443struct ifnet; struct mbuf;      /* forward declarations for Standard C */
    446444
    447 int      in_broadcast __P((struct in_addr, struct ifnet *));
    448 int      in_canforward __P((struct in_addr));
    449 int      in_cksum __P((struct mbuf *, int));
    450 int      in_localaddr __P((struct in_addr));
    451 char    *inet_ntoa __P((struct in_addr)); /* in libkern */
     445int      in_broadcast(struct in_addr, struct ifnet *);
     446int      in_canforward(struct in_addr);
     447int      in_cksum(struct mbuf *, int);
     448int      in_localaddr(struct in_addr);
     449char    *inet_ntoa(struct in_addr); /* in libkern */
    452450
    453451/* Firewall hooks */
  • cpukit/libnetworking/nfs/xdr_subs.h

    r4e7d39ef rd74c13b  
    1414 *    notice, this list of conditions and the following disclaimer in the
    1515 *    documentation and/or other materials provided with the distribution.
    16  * 3. All advertising materials mentioning features or use of this software
    17  *    must display the following acknowledgement:
    18  *      This product includes software developed by the University of
    19  *      California, Berkeley and its contributors.
    2016 * 4. Neither the name of the University nor the names of its contributors
    2117 *    may be used to endorse or promote products derived from this software
     
    3430 * SUCH DAMAGE.
    3531 *
    36  *      @(#)xdr_subs.h  8.1 (Berkeley) 6/10/93
     32 *      @(#)xdr_subs.h  8.3 (Berkeley) 3/30/95
     33 * $FreeBSD: src/sys/nfs/xdr_subs.h,v 1.15 2005/01/07 01:45:50 imp Exp $
     34 */
     35 
     36/*
    3737 * $Id$
    3838 */
     
    5252 */
    5353
    54 #define fxdr_unsigned(t, v)     ((t)ntohl((long)(v)))
    55 #define txdr_unsigned(v)        (htonl((long)(v)))
     54#define fxdr_unsigned(t, v)     ((t)ntohl((int32_t)(v)))
     55#define txdr_unsigned(v)        (htonl((int32_t)(v)))
    5656
    5757#define fxdr_nfsv2time(f, t) { \
     
    7979}
    8080
    81 #define fxdr_hyper(f, t) { \
    82         ((long *)(t))[_QUAD_HIGHWORD] = ntohl(((long *)(f))[0]); \
    83         ((long *)(t))[_QUAD_LOWWORD] = ntohl(((long *)(f))[1]); \
    84 }
    85 #define txdr_hyper(f, t) { \
    86         ((long *)(t))[0] = htonl(((long *)(f))[_QUAD_HIGHWORD]); \
    87         ((long *)(t))[1] = htonl(((long *)(f))[_QUAD_LOWWORD]); \
    88 }
     81#define fxdr_hyper(f) \
     82        ((((u_quad_t)ntohl(((u_int32_t *)(f))[0])) << 32) | \
     83         (u_quad_t)(ntohl(((u_int32_t *)(f))[1])))
     84#define txdr_hyper(f, t) \
     85do { \
     86        ((u_int32_t *)(t))[0] = htonl((u_int32_t)((f) >> 32)); \
     87        ((u_int32_t *)(t))[1] = htonl((u_int32_t)((f) & 0xffffffff)); \
     88} while (0)
    8989
    9090#endif
Note: See TracChangeset for help on using the changeset viewer.