Changeset 0c67b436 in rtems


Ignore:
Timestamp:
Mar 29, 2007, 5:18:26 AM (13 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
14b7b0c6
Parents:
5f1bbae
Message:

Partial update from FreeBSD.

File:
1 edited

Legend:

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

    r5f1bbae r0c67b436  
    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 *      @(#)ip_output.c 8.3 (Berkeley) 1/21/94
     30 * $FreeBSD: src/sys/netinet/ip_output.c,v 1.271 2007/03/23 09:43:36 bms Exp $
     31 */
     32
     33/*
    3434 *      $Id$
    3535 */
     
    5757#include <netinet/ip_var.h>
    5858
    59 #ifdef vax
    60 #include <machine/mtpr.h>
    61 #endif
    6259#include <machine/in_cksum.h>
    6360
     
    141138                ro->ro_rt = (struct rtentry *)0;
    142139        }
    143         if (ro->ro_rt == 0) {
     140        if (ro->ro_rt == NULL) {
    144141                dst->sin_family = AF_INET;
    145142                dst->sin_len = sizeof(*dst);
     
    309306        /*
    310307         * Look for broadcast address and
    311          * and verify user is allowed to send
     308         * verify user is allowed to send
    312309         * such a packet.
    313310         */
     
    373370
    374371        /*
    375          * If small enough for interface, can just send directly.
     372         * If small enough for interface, or the interface will take
     373         * care of the fragmentation for us, we can just send directly.
    376374         */
    377375        if ((u_short)ip->ip_len <= ifp->if_mtu) {
    378                 ip->ip_len = htons((u_short)ip->ip_len);
    379                 ip->ip_off = htons((u_short)ip->ip_off);
     376                ip->ip_len = htons(ip->ip_len);
     377                ip->ip_off = htons(ip->ip_off);
    380378                ip->ip_sum = 0;
    381379                if (ip->ip_vhl == IP_VHL_BORING) {
     
    456454                }
    457455                m->m_pkthdr.len = mhlen + len;
    458                 m->m_pkthdr.rcvif = (struct ifnet *)0;
    459                 mhip->ip_off = htons((u_short)mhip->ip_off);
     456                m->m_pkthdr.rcvif = NULL;
     457                mhip->ip_off = htons(mhip->ip_off);
    460458                mhip->ip_sum = 0;
    461459                if (mhip->ip_vhl == IP_VHL_BORING) {
     
    476474        m->m_pkthdr.len = hlen + firstlen;
    477475        ip->ip_len = htons((u_short)m->m_pkthdr.len);
    478         ip->ip_off = htons((u_short)(ip->ip_off | IP_MF));
     476        ip->ip_off |= IP_MF;
     477        ip->ip_off = htons(ip->ip_off);
    479478        ip->ip_sum = 0;
    480479        if (ip->ip_vhl == IP_VHL_BORING) {
     
    601600        struct mbuf **mp;
    602601{
    603         register struct inpcb *inp = sotoinpcb(so);
     602        struct  inpcb *inp = sotoinpcb(so);
    604603        register struct mbuf *m = *mp;
    605604        register int optval = 0;
     
    914913        struct mbuf *m;
    915914{
    916         register int error = 0;
     915        int error = 0;
    917916        u_char loop;
    918         register int i;
     917        int i;
    919918        struct in_addr addr;
    920         register struct ip_mreq *mreq;
    921         register struct ifnet *ifp;
    922         register struct ip_moptions *imo = *imop;
     919        struct ip_mreq *mreq;
     920        struct ifnet *ifp;
     921        struct ip_moptions *imo = *imop;
    923922        struct route ro;
    924923        register struct sockaddr_in *dst;
     
    12791278                 */
    12801279                ip = mtod(copym, struct ip *);
    1281                 ip->ip_len = htons((u_short)ip->ip_len);
    1282                 ip->ip_off = htons((u_short)ip->ip_off);
     1280                ip->ip_len = htons(ip->ip_len);
     1281                ip->ip_off = htons(ip->ip_off);
    12831282                ip->ip_sum = 0;
    12841283                if (ip->ip_vhl == IP_VHL_BORING) {
Note: See TracChangeset for help on using the changeset viewer.