Changeset 4c92297a in rtems


Ignore:
Timestamp:
Feb 4, 2005, 4:35:05 PM (16 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
f5df587
Parents:
35e60150
Message:

Misc. part. updates from FreeBSD.

Location:
cpukit/libnetworking
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libnetworking/libc/res_init.c

    r35e60150 r4c92297a  
    9797#include <rtems/bsdnet/servers.h>
    9898
    99 static void res_setoptions __P((char *, char *));
     99static void res_setoptions(char *, char *);
    100100
    101101#ifdef RESOLVSORT
    102102static const char sort_mask[] = "/&";
    103103#define ISSORTMASK(ch) (strchr(sort_mask, ch) != NULL)
    104 static u_int32_t net_mask __P((struct in_addr));
     104static u_int32_t net_mask(struct in_addr);
    105105#endif
    106106
     
    144144res_init()
    145145{
    146         register FILE *fp;
    147         register char *cp, **pp;
    148         register int n;
     146        FILE *fp;
     147        char *cp, **pp;
     148        int n;
    149149        char buf[MAXDNAME];
    150150        int nserv = 0;    /* number of nameserver records read from file */
     
    483483        struct in_addr in;
    484484{
    485         register u_int32_t i = ntohl(in.s_addr);
     485        u_int32_t i = ntohl(in.s_addr);
    486486
    487487        if (IN_CLASSA(i))
  • cpukit/libnetworking/netinet/in.h

    r35e60150 r4c92297a  
    1111 *    notice, this list of conditions and the following disclaimer in the
    1212 *    documentation and/or other materials provided with the distribution.
    13  * 3. All advertising materials mentioning features or use of this software
    14  *    must display the following acknowledgement:
    15  *      This product includes software developed by the University of
    16  *      California, Berkeley and its contributors.
    1713 * 4. Neither the name of the University nor the names of its contributors
    1814 *    may be used to endorse or promote products derived from this software
     
    3228 *
    3329 *      @(#)in.h        8.3 (Berkeley) 1/3/94
     30 * $FreeBSD: src/sys/netinet/in.h,v 1.89 2005/01/07 01:45:44 imp Exp $
     31 */
     32 
     33/*
    3434 * $Id$
    3535 */
     
    3838#define _NETINET_IN_H_
    3939
    40 #include <machine/endian.h>  /* for ntohx routines */
     40#include <machine/endian.h>
     41
     42/* Protocols common to RFC 1700, POSIX, and X/Open. */
     43#define IPPROTO_IP              0               /* dummy for IP */
     44#define IPPROTO_ICMP            1               /* control message protocol */
     45#define IPPROTO_TCP             6               /* tcp */
     46#define IPPROTO_UDP             17              /* user datagram protocol */
    4147
    4248/*
     
    4854 * Protocols (RFC 1700)
    4955 */
    50 #define IPPROTO_IP              0               /* dummy for IP */
    51 #define IPPROTO_ICMP            1               /* control message protocol */
     56#define IPPROTO_HOPOPTS         0               /* IP6 hop-by-hop options */
    5257#define IPPROTO_IGMP            2               /* group mgmt protocol */
    5358#define IPPROTO_GGP             3               /* gateway^2 (deprecated) */
    54 #define IPPROTO_IPIP            4               /* IP encapsulation in IP */
    55 #define IPPROTO_TCP             6               /* tcp */
     59#define IPPROTO_IPV4            4               /* IPv4 encapsulation */
     60#define IPPROTO_IPIP            IPPROTO_IPV4    /* for compatibility */
    5661#define IPPROTO_ST              7               /* Stream protocol II */
    5762#define IPPROTO_EGP             8               /* exterior gateway protocol */
     
    6469#define IPPROTO_XNET            15              /* Cross Net Debugger */
    6570#define IPPROTO_CHAOS           16              /* Chaos*/
    66 #define IPPROTO_UDP             17              /* user datagram protocol */
    6771#define IPPROTO_MUX             18              /* Multiplexing */
    6872#define IPPROTO_MEAS            19              /* DCN Measurement Subsystems */
     
    8892#define IPPROTO_TPXX            39              /* TP++ Transport */
    8993#define IPPROTO_IL              40              /* IL transport protocol */
    90 #define IPPROTO_SIP             41              /* Simple Internet Protocol */
     94#define IPPROTO_IPV6            41              /* IP6 header */
    9195#define IPPROTO_SDRP            42              /* Source Demand Routing */
    92 #define IPPROTO_SIPSR           43              /* SIP Source Route */
    93 #define IPPROTO_SIPFRAG         44              /* SIP Fragment */
     96#define IPPROTO_ROUTING         43              /* IP6 routing header */
     97#define IPPROTO_FRAGMENT        44              /* IP6 fragmentation header */
    9498#define IPPROTO_IDRP            45              /* InterDomain Routing*/
    9599#define IPPROTO_RSVP            46              /* resource reservation */
     
    97101#define IPPROTO_MHRP            48              /* Mobile Host Routing */
    98102#define IPPROTO_BHA             49              /* BHA */
    99 #define IPPROTO_ESP             50              /* SIPP Encap Sec. Payload */
    100 #define IPPROTO_AH              51              /* SIPP Auth Header */
     103#define IPPROTO_ESP             50              /* IP6 Encap Sec. Payload */
     104#define IPPROTO_AH              51              /* IP6 Auth Header */
    101105#define IPPROTO_INLSP           52              /* Integ. Net Layer Security */
    102106#define IPPROTO_SWIPE           53              /* IP with encryption */
    103107#define IPPROTO_NHRP            54              /* Next Hop Resolution */
    104 /* 55-60: Unassigned */
     108#define IPPROTO_MOBILE          55              /* IP Mobility */
     109#define IPPROTO_TLSP            56              /* Transport Layer Security */
     110#define IPPROTO_SKIP            57              /* SKIP */
     111#define IPPROTO_ICMPV6          58              /* ICMP6 */
     112#define IPPROTO_NONE            59              /* IP6 no next header */
     113#define IPPROTO_DSTOPTS         60              /* IP6 destination option */
    105114#define IPPROTO_AHIP            61              /* any host internal protocol */
    106115#define IPPROTO_CFTP            62              /* CFTP */
     
    171180 * The value IP_PORTRANGE_HIGH changes the range of candidate port numbers
    172181 * into the "high" range.  These are reserved for client outbound connections
    173  * which do not want to be filtered by any firewalls.
     182 * which do not want to be filtered by any firewalls.  Note that by default
     183 * this is the same as IP_PORTRANGE_DEFAULT.
    174184 *
    175185 * The value IP_PORTRANGE_LOW changes the range to the "low" are
     
    301311#define IP_RECVRETOPTS          6    /* bool; receive IP opts for response */
    302312#define IP_RECVDSTADDR          7    /* bool; receive IP dst addr w/dgram */
     313#define IP_SENDSRCADDR          IP_RECVDSTADDR /* cmsg_type to set src addr */
    303314#define IP_RETOPTS              8    /* ip_opts; set/get IP options */
    304315#define IP_MULTICAST_IF         9    /* u_char; set/get IP multicast i/f  */
     
    441452#endif /* _KERNEL */
    442453
    443 #endif
     454#endif /* !_NETINET_IN_H_*/
  • cpukit/libnetworking/netinet/in_pcb.c

    r35e60150 r4c92297a  
    1111 *    notice, this list of conditions and the following disclaimer in the
    1212 *    documentation and/or other materials provided with the distribution.
    13  * 3. All advertising materials mentioning features or use of this software
    14  *    must display the following acknowledgement:
    15  *      This product includes software developed by the University of
    16  *      California, Berkeley and its contributors.
    1713 * 4. Neither the name of the University nor the names of its contributors
    1814 *    may be used to endorse or promote products derived from this software
     
    3228 *
    3329 *      @(#)in_pcb.c    8.4 (Berkeley) 5/24/95
     30 * $FreeBSD: src/sys/netinet/in_pcb.c,v 1.158 2005/01/07 01:45:44 imp Exp $
     31 */
     32 
     33/*
    3434 *      $Id$
    3535 */
  • cpukit/libnetworking/netinet/raw_ip.c

    r35e60150 r4c92297a  
    1111 *    notice, this list of conditions and the following disclaimer in the
    1212 *    documentation and/or other materials provided with the distribution.
    13  * 3. All advertising materials mentioning features or use of this software
    14  *    must display the following acknowledgement:
    15  *      This product includes software developed by the University of
    16  *      California, Berkeley and its contributors.
    1713 * 4. Neither the name of the University nor the names of its contributors
    1814 *    may be used to endorse or promote products derived from this software
     
    3228 *
    3329 *      @(#)raw_ip.c    8.7 (Berkeley) 5/15/95
     30 * $FreeBSD: src/sys/netinet/raw_ip.c,v 1.147 2005/01/07 01:45:45 imp Exp $
     31 */
     32
     33/*
    3434 *      $Id$
    3535 */
     36 
     37#include "opt_inet6.h"
     38#include "opt_ipsec.h"
     39#include "opt_mac.h"
    3640
    3741#include <sys/param.h>
     
    102106 */
    103107void
    104 rip_input(m, iphlen)
    105         struct mbuf *m;
    106         int iphlen;
     108rip_input(struct mbuf *m, int iphlen)
    107109{
    108         register struct ip *ip = mtod(m, struct ip *);
     110        struct ip *ip = mtod(m, struct ip *);
    109111        register struct inpcb *inp;
    110112        struct inpcb *last = 0;
     
    164166 */
    165167int
    166 rip_output(m, so, dst)
    167         register struct mbuf *m;
    168         struct socket *so;
    169         u_long dst;
     168rip_output(struct mbuf *m, struct socket *so, u_long dst)
    170169{
    171         register struct ip *ip;
    172         register struct inpcb *inp = sotoinpcb(so);
    173         int flags = (so->so_options & SO_DONTROUTE) | IP_ALLOWBROADCAST;
     170        struct ip *ip;
     171        struct inpcb *inp = sotoinpcb(so);
     172        int flags = ((so->so_options & SO_DONTROUTE) ? IP_ROUTETOIF : 0) |
     173            IP_ALLOWBROADCAST;
    174174
    175175        /*
     
    226226        struct mbuf **m;
    227227{
    228         register struct inpcb *inp = sotoinpcb(so);
    229         register int error;
     228        struct inpcb *inp = sotoinpcb(so);
     229        int error;
    230230
    231231        if (level != IPPROTO_IP) {
Note: See TracChangeset for help on using the changeset viewer.