spx_usrreq.c (151888) | spx_usrreq.c (151967) |
---|---|
1/*- 2 * Copyright (c) 2004-2005 Robert N. M. Watson 3 * Copyright (c) 1995, Mike Mitchell 4 * Copyright (c) 1984, 1985, 1986, 1987, 1993 5 * The Regents of the University of California. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 22 unchanged lines hidden (view full) --- 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 * 35 * @(#)spx_usrreq.h 36 */ 37 38#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2004-2005 Robert N. M. Watson 3 * Copyright (c) 1995, Mike Mitchell 4 * Copyright (c) 1984, 1985, 1986, 1987, 1993 5 * The Regents of the University of California. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 22 unchanged lines hidden (view full) --- 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 * 35 * @(#)spx_usrreq.h 36 */ 37 38#include <sys/cdefs.h> |
39__FBSDID("$FreeBSD: head/sys/netipx/spx_usrreq.c 151888 2005-10-30 19:44:40Z rwatson $"); | 39__FBSDID("$FreeBSD: head/sys/netipx/spx_usrreq.c 151967 2005-11-02 13:46:32Z andre $"); |
40 41#include <sys/param.h> 42#include <sys/lock.h> 43#include <sys/malloc.h> 44#include <sys/mbuf.h> 45#include <sys/mutex.h> 46#include <sys/proc.h> 47#include <sys/protosw.h> --- 760 unchanged lines hidden (view full) --- 808 m_freem(m0); 809 return (ENOBUFS); 810 } 811 m1->m_len = 1; 812 *(mtod(m1, u_char *)) = 0; 813 m->m_next = m1; 814 } 815 } | 40 41#include <sys/param.h> 42#include <sys/lock.h> 43#include <sys/malloc.h> 44#include <sys/mbuf.h> 45#include <sys/mutex.h> 46#include <sys/proc.h> 47#include <sys/protosw.h> --- 760 unchanged lines hidden (view full) --- 808 m_freem(m0); 809 return (ENOBUFS); 810 } 811 m1->m_len = 1; 812 *(mtod(m1, u_char *)) = 0; 813 m->m_next = m1; 814 } 815 } |
816 m = m_gethdr(M_DONTWAIT, MT_HEADER); | 816 m = m_gethdr(M_DONTWAIT, MT_DATA); |
817 if (m == NULL) { 818 m_freem(m0); 819 return (ENOBUFS); 820 } 821 /* 822 * Fill in mbuf with extended SP header 823 * and addresses and length put into network format. 824 */ --- 196 unchanged lines hidden (view full) --- 1021 } else if (cb->s_force || cb->s_flags & SF_ACKNOW) { 1022 /* 1023 * Must send an acknowledgement or a probe 1024 */ 1025 if (cb->s_force) 1026 spxstat.spxs_sndprobe++; 1027 if (cb->s_flags & SF_ACKNOW) 1028 spxstat.spxs_sndacks++; | 817 if (m == NULL) { 818 m_freem(m0); 819 return (ENOBUFS); 820 } 821 /* 822 * Fill in mbuf with extended SP header 823 * and addresses and length put into network format. 824 */ --- 196 unchanged lines hidden (view full) --- 1021 } else if (cb->s_force || cb->s_flags & SF_ACKNOW) { 1022 /* 1023 * Must send an acknowledgement or a probe 1024 */ 1025 if (cb->s_force) 1026 spxstat.spxs_sndprobe++; 1027 if (cb->s_flags & SF_ACKNOW) 1028 spxstat.spxs_sndacks++; |
1029 m = m_gethdr(M_DONTWAIT, MT_HEADER); | 1029 m = m_gethdr(M_DONTWAIT, MT_DATA); |
1030 if (m == NULL) 1031 return (ENOBUFS); 1032 /* 1033 * Fill in mbuf with extended SP header 1034 * and addresses and length put into network format. 1035 */ 1036 MH_ALIGN(m, sizeof(struct spx)); 1037 m->m_len = sizeof(*si); --- 330 unchanged lines hidden (view full) --- 1368 MALLOC(cb, struct spxpcb *, sizeof *cb, M_PCB, M_NOWAIT | M_ZERO); 1369 1370 if (cb == NULL) { 1371 error = ENOBUFS; 1372 goto spx_attach_end; 1373 } 1374 sb = &so->so_snd; 1375 | 1030 if (m == NULL) 1031 return (ENOBUFS); 1032 /* 1033 * Fill in mbuf with extended SP header 1034 * and addresses and length put into network format. 1035 */ 1036 MH_ALIGN(m, sizeof(struct spx)); 1037 m->m_len = sizeof(*si); --- 330 unchanged lines hidden (view full) --- 1368 MALLOC(cb, struct spxpcb *, sizeof *cb, M_PCB, M_NOWAIT | M_ZERO); 1369 1370 if (cb == NULL) { 1371 error = ENOBUFS; 1372 goto spx_attach_end; 1373 } 1374 sb = &so->so_snd; 1375 |
1376 mm = m_getclr(M_DONTWAIT, MT_HEADER); | 1376 mm = m_getclr(M_DONTWAIT, MT_DATA); |
1377 if (mm == NULL) { 1378 FREE(cb, M_PCB); 1379 error = ENOBUFS; 1380 goto spx_attach_end; 1381 } 1382 cb->s_ipx = mtod(mm, struct ipx *); 1383 cb->s_state = TCPS_LISTEN; 1384 cb->s_smax = -1; --- 598 unchanged lines hidden --- | 1377 if (mm == NULL) { 1378 FREE(cb, M_PCB); 1379 error = ENOBUFS; 1380 goto spx_attach_end; 1381 } 1382 cb->s_ipx = mtod(mm, struct ipx *); 1383 cb->s_state = TCPS_LISTEN; 1384 cb->s_smax = -1; --- 598 unchanged lines hidden --- |