udp_usrreq.c (1542) | udp_usrreq.c (1549) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1988, 1990, 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 --- 20 unchanged lines hidden (view full) --- 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.4 (Berkeley) 1/21/94 34 */ 35 36#include <sys/param.h> | 1/* 2 * Copyright (c) 1982, 1986, 1988, 1990, 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 --- 20 unchanged lines hidden (view full) --- 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.4 (Berkeley) 1/21/94 34 */ 35 36#include <sys/param.h> |
37#include <sys/systm.h> |
|
37#include <sys/malloc.h> 38#include <sys/mbuf.h> 39#include <sys/protosw.h> 40#include <sys/socket.h> 41#include <sys/socketvar.h> 42#include <sys/errno.h> 43#include <sys/stat.h> 44 --- 332 unchanged lines hidden (view full) --- 377udp_output(inp, m, addr, control) 378 register struct inpcb *inp; 379 register struct mbuf *m; 380 struct mbuf *addr, *control; 381{ 382 register struct udpiphdr *ui; 383 register int len = m->m_pkthdr.len; 384 struct in_addr laddr; | 38#include <sys/malloc.h> 39#include <sys/mbuf.h> 40#include <sys/protosw.h> 41#include <sys/socket.h> 42#include <sys/socketvar.h> 43#include <sys/errno.h> 44#include <sys/stat.h> 45 --- 332 unchanged lines hidden (view full) --- 378udp_output(inp, m, addr, control) 379 register struct inpcb *inp; 380 register struct mbuf *m; 381 struct mbuf *addr, *control; 382{ 383 register struct udpiphdr *ui; 384 register int len = m->m_pkthdr.len; 385 struct in_addr laddr; |
385 int s, error = 0; | 386 int s = 0, error = 0; |
386 387 if (control) 388 m_freem(control); /* XXX */ 389 390 if (addr) { 391 laddr = inp->inp_laddr; 392 if (inp->inp_faddr.s_addr != INADDR_ANY) { 393 error = EISCONN; --- 219 unchanged lines hidden (view full) --- 613 udp_last_inpcb = &udb; 614 in_pcbdetach(inp); 615 splx(s); 616} 617 618/* 619 * Sysctl for udp variables. 620 */ | 387 388 if (control) 389 m_freem(control); /* XXX */ 390 391 if (addr) { 392 laddr = inp->inp_laddr; 393 if (inp->inp_faddr.s_addr != INADDR_ANY) { 394 error = EISCONN; --- 219 unchanged lines hidden (view full) --- 614 udp_last_inpcb = &udb; 615 in_pcbdetach(inp); 616 splx(s); 617} 618 619/* 620 * Sysctl for udp variables. 621 */ |
622int |
|
621udp_sysctl(name, namelen, oldp, oldlenp, newp, newlen) 622 int *name; 623 u_int namelen; 624 void *oldp; 625 size_t *oldlenp; 626 void *newp; 627 size_t newlen; 628{ --- 12 unchanged lines hidden --- | 623udp_sysctl(name, namelen, oldp, oldlenp, newp, newlen) 624 int *name; 625 u_int namelen; 626 void *oldp; 627 size_t *oldlenp; 628 void *newp; 629 size_t newlen; 630{ --- 12 unchanged lines hidden --- |