Deleted Added
full compact
raw_cb.c (159164) raw_cb.c (177599)
1/*-
2 * Copyright (c) 1980, 1986, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 13 unchanged lines hidden (view full) ---

22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * @(#)raw_cb.c 8.1 (Berkeley) 6/10/93
1/*-
2 * Copyright (c) 1980, 1986, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 13 unchanged lines hidden (view full) ---

22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * @(#)raw_cb.c 8.1 (Berkeley) 6/10/93
30 * $FreeBSD: head/sys/net/raw_cb.c 159164 2006-06-02 08:27:15Z rwatson $
30 * $FreeBSD: head/sys/net/raw_cb.c 177599 2008-03-25 09:39:02Z ru $
31 */
32
33#include <sys/param.h>
34#include <sys/domain.h>
35#include <sys/lock.h>
36#include <sys/malloc.h>
37#include <sys/mutex.h>
38#include <sys/protosw.h>

--- 97 unchanged lines hidden (view full) ---

136 struct mbuf *nam;
137{
138 struct sockaddr *addr = mtod(nam, struct sockaddr *);
139 register struct rawcb *rp;
140
141 if (ifnet == 0)
142 return (EADDRNOTAVAIL);
143 rp = sotorawcb(so);
31 */
32
33#include <sys/param.h>
34#include <sys/domain.h>
35#include <sys/lock.h>
36#include <sys/malloc.h>
37#include <sys/mutex.h>
38#include <sys/protosw.h>

--- 97 unchanged lines hidden (view full) ---

136 struct mbuf *nam;
137{
138 struct sockaddr *addr = mtod(nam, struct sockaddr *);
139 register struct rawcb *rp;
140
141 if (ifnet == 0)
142 return (EADDRNOTAVAIL);
143 rp = sotorawcb(so);
144 nam = m_copym(nam, 0, M_COPYALL, M_TRYWAIT);
144 nam = m_copym(nam, 0, M_COPYALL, M_WAIT);
145 rp->rcb_laddr = mtod(nam, struct sockaddr *);
146 return (0);
147}
148#endif
145 rp->rcb_laddr = mtod(nam, struct sockaddr *);
146 return (0);
147}
148#endif