udp_usrreq.c (12820) | udp_usrreq.c (12881) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1988, 1990, 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 * @(#)udp_usrreq.c 8.6 (Berkeley) 5/23/95 | 1/* 2 * Copyright (c) 1982, 1986, 1988, 1990, 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 * @(#)udp_usrreq.c 8.6 (Berkeley) 5/23/95 |
34 * $Id: udp_usrreq.c,v 1.17 1995/12/06 23:37:44 bde Exp $ | 34 * $Id: udp_usrreq.c,v 1.18 1995/12/14 09:53:49 phk 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> --- 325 unchanged lines hidden (view full) --- 368 int errno; 369{ 370 inp->inp_socket->so_error = errno; 371 sorwakeup(inp->inp_socket); 372 sowwakeup(inp->inp_socket); 373} 374 375void | 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> --- 325 unchanged lines hidden (view full) --- 368 int errno; 369{ 370 inp->inp_socket->so_error = errno; 371 sorwakeup(inp->inp_socket); 372 sowwakeup(inp->inp_socket); 373} 374 375void |
376udp_ctlinput(cmd, sa, ip) | 376udp_ctlinput(cmd, sa, vip) |
377 int cmd; 378 struct sockaddr *sa; | 377 int cmd; 378 struct sockaddr *sa; |
379 register struct ip *ip; | 379 void *vip; |
380{ | 380{ |
381 register struct ip *ip = vip; |
|
381 register struct udphdr *uh; 382 383 if (!PRC_IS_REDIRECT(cmd) && 384 ((unsigned)cmd >= PRC_NCMDS || inetctlerrmap[cmd] == 0)) 385 return; 386 if (ip) { 387 uh = (struct udphdr *)((caddr_t)ip + (ip->ip_hl << 2)); 388 in_pcbnotify(&udb, sa, uh->uh_dport, ip->ip_src, uh->uh_sport, --- 251 unchanged lines hidden --- | 382 register struct udphdr *uh; 383 384 if (!PRC_IS_REDIRECT(cmd) && 385 ((unsigned)cmd >= PRC_NCMDS || inetctlerrmap[cmd] == 0)) 386 return; 387 if (ip) { 388 uh = (struct udphdr *)((caddr_t)ip + (ip->ip_hl << 2)); 389 in_pcbnotify(&udb, sa, uh->uh_dport, ip->ip_src, uh->uh_sport, --- 251 unchanged lines hidden --- |