Deleted Added
full compact
in_pcb.c (10940) in_pcb.c (11921)
1/*
2 * Copyright (c) 1982, 1986, 1991, 1993, 1995
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

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

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)in_pcb.c 8.4 (Berkeley) 5/24/95
1/*
2 * Copyright (c) 1982, 1986, 1991, 1993, 1995
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

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

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)in_pcb.c 8.4 (Berkeley) 5/24/95
34 * $Id: in_pcb.c,v 1.12 1995/05/30 08:09:28 rgrimes Exp $
34 * $Id: in_pcb.c,v 1.13 1995/09/21 17:55:49 wollman Exp $
35 */
36
37#include <sys/param.h>
38#include <sys/systm.h>
39#include <sys/malloc.h>
40#include <sys/mbuf.h>
41#include <sys/protosw.h>
42#include <sys/socket.h>

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

173
174int
175in_pcbladdr(inp, nam, plocal_sin)
176 register struct inpcb *inp;
177 struct mbuf *nam;
178 struct sockaddr_in **plocal_sin;
179{
180 struct in_ifaddr *ia;
35 */
36
37#include <sys/param.h>
38#include <sys/systm.h>
39#include <sys/malloc.h>
40#include <sys/mbuf.h>
41#include <sys/protosw.h>
42#include <sys/socket.h>

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

173
174int
175in_pcbladdr(inp, nam, plocal_sin)
176 register struct inpcb *inp;
177 struct mbuf *nam;
178 struct sockaddr_in **plocal_sin;
179{
180 struct in_ifaddr *ia;
181 struct sockaddr_in *ifaddr = 0;
182 register struct sockaddr_in *sin = mtod(nam, struct sockaddr_in *);
183
184 if (nam->m_len != sizeof (*sin))
185 return (EINVAL);
186 if (sin->sin_family != AF_INET)
187 return (EAFNOSUPPORT);
188 if (sin->sin_port == 0)
189 return (EADDRNOTAVAIL);

--- 435 unchanged lines hidden ---
181 register struct sockaddr_in *sin = mtod(nam, struct sockaddr_in *);
182
183 if (nam->m_len != sizeof (*sin))
184 return (EINVAL);
185 if (sin->sin_family != AF_INET)
186 return (EAFNOSUPPORT);
187 if (sin->sin_port == 0)
188 return (EADDRNOTAVAIL);

--- 435 unchanged lines hidden ---