Changeset 7ff51b00 in rtems


Ignore:
Timestamp:
Mar 29, 2007, 5:21:31 AM (13 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
58b0907
Parents:
cae2fc3
Message:

Preps to eliminate _IP_VHL (Abandoned in FreeBSD).

Location:
cpukit/libnetworking/netinet
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libnetworking/netinet/raw_ip.c

    rcae2fc3 r7ff51b00  
    5555#include <netinet/in.h>
    5656#include <netinet/in_systm.h>
    57 #include <netinet/ip.h>
    5857#include <netinet/in_pcb.h>
    5958#include <netinet/in_var.h>
     59#include <netinet/ip.h>
    6060#include <netinet/ip_var.h>
    6161#include <netinet/ip_mroute.h>
     
    199199                /* don't allow both user specified and setsockopt options,
    200200                   and don't allow packet length sizes that will crash */
     201#ifdef _IP_VHL
    201202                if (((IP_VHL_HL(ip->ip_vhl) != (sizeof (*ip) >> 2))
    202203                     && inp->inp_options)
    203204                    || (ip->ip_len > m->m_pkthdr.len)
    204205                    || (ip->ip_len < (IP_VHL_HL(ip->ip_vhl) << 2))) {
     206#else
     207                if (((ip->ip_hl != (sizeof (*ip) >> 2))
     208                     && inp->inp_options)
     209                    || (ip->ip_len > m->m_pkthdr.len)
     210                    || (ip->ip_len < (ip->ip_hl << 2))) {
     211#endif
    205212                        m_freem(m);
    206213                        return EINVAL;
  • cpukit/libnetworking/netinet/tcp_subr.c

    rcae2fc3 r7ff51b00  
    593593                 ((unsigned)cmd > PRC_NCMDS || inetctlerrmap[cmd] == 0))
    594594                return;
    595         if (ip) {
     595        if (ip != NULL) {
     596#ifdef _IP_VHL
    596597                th = (struct tcphdr *)((caddr_t)ip
    597598                                       + (IP_VHL_HL(ip->ip_vhl) << 2));
     599#else
     600                th = (struct tcphdr *)((caddr_t)ip
     601                                       + (ip->ip_hl << 2));
     602#endif
    598603                in_pcbnotify(&tcb, sa, th->th_dport, ip->ip_src, th->th_sport,
    599604                        cmd, notify);
Note: See TracChangeset for help on using the changeset viewer.