Skip to content
Snippets Groups Projects
Select Git revision
  • 4d78b6c78ae6d87e4c1c8072f42efa716f04afb9
  • master default
  • for-kernelci
  • nio-12l-disp
  • mt8195-tracking-master-rolling
  • 6.1-cros-tast-mt8192-asurada-spherion
  • temp/mt8195-tracking-master-rolling
  • feat/mtk-clocks-restructure
  • mt8195-rel-vp9-common-probs
  • mt8195-tracking-master
  • mt8195-rel
  • mt8195-rel-chromeos
  • chromeos-5.15
  • chromeos-5.14
  • chromeos-5.7
  • topic-drivers-20200402
  • topic-cros_ec-20200402
  • topic-mediatek-20200402
  • v5.6-rc7
  • v5.6-rc6
  • v5.6-rc5
  • v5.6-rc4
  • v5.6-rc3
  • v5.6-rc2
  • v5.6-rc1
  • v5.5
  • v5.5-rc7
  • v5.5-rc6
  • v5.5-rc5
  • v5.5-rc4
  • v5.5-rc3
  • v5.5-rc2
  • v5.5-rc1
  • v5.4
  • v5.4-rc8
35 results

udp.c

  • udp.c 37.32 KiB
    /*
     * INET		An implementation of the TCP/IP protocol suite for the LINUX
     *		operating system.  INET is implemented using the  BSD Socket
     *		interface as the means of communication with the user level.
     *
     *		The User Datagram Protocol (UDP).
     *
     * Version:	$Id: udp.c,v 1.102 2002/02/01 22:01:04 davem Exp $
     *
     * Authors:	Ross Biro, <bir7@leland.Stanford.Edu>
     *		Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
     *		Arnt Gulbrandsen, <agulbra@nvg.unit.no>
     *		Alan Cox, <Alan.Cox@linux.org>
     *		Hirokazu Takahashi, <taka@valinux.co.jp>
     *
     * Fixes:
     *		Alan Cox	:	verify_area() calls
     *		Alan Cox	: 	stopped close while in use off icmp
     *					messages. Not a fix but a botch that
     *					for udp at least is 'valid'.
     *		Alan Cox	:	Fixed icmp handling properly
     *		Alan Cox	: 	Correct error for oversized datagrams
     *		Alan Cox	:	Tidied select() semantics. 
     *		Alan Cox	:	udp_err() fixed properly, also now 
     *					select and read wake correctly on errors
     *		Alan Cox	:	udp_send verify_area moved to avoid mem leak
     *		Alan Cox	:	UDP can count its memory
     *		Alan Cox	:	send to an unknown connection causes
     *					an ECONNREFUSED off the icmp, but
     *					does NOT close.
     *		Alan Cox	:	Switched to new sk_buff handlers. No more backlog!
     *		Alan Cox	:	Using generic datagram code. Even smaller and the PEEK
     *					bug no longer crashes it.
     *		Fred Van Kempen	: 	Net2e support for sk->broadcast.
     *		Alan Cox	:	Uses skb_free_datagram
     *		Alan Cox	:	Added get/set sockopt support.
     *		Alan Cox	:	Broadcasting without option set returns EACCES.
     *		Alan Cox	:	No wakeup calls. Instead we now use the callbacks.
     *		Alan Cox	:	Use ip_tos and ip_ttl
     *		Alan Cox	:	SNMP Mibs
     *		Alan Cox	:	MSG_DONTROUTE, and 0.0.0.0 support.
     *		Matt Dillon	:	UDP length checks.
     *		Alan Cox	:	Smarter af_inet used properly.
     *		Alan Cox	:	Use new kernel side addressing.
     *		Alan Cox	:	Incorrect return on truncated datagram receive.
     *	Arnt Gulbrandsen 	:	New udp_send and stuff
     *		Alan Cox	:	Cache last socket
     *		Alan Cox	:	Route cache
     *		Jon Peatfield	:	Minor efficiency fix to sendto().
     *		Mike Shaver	:	RFC1122 checks.
     *		Alan Cox	:	Nonblocking error fix.
     *	Willy Konynenberg	:	Transparent proxying support.
     *		Mike McLagan	:	Routing by source
     *		David S. Miller	:	New socket lookup architecture.
     *					Last socket cache retained as it
     *					does have a high hit rate.
     *		Olaf Kirch	:	Don't linearise iovec on sendmsg.
     *		Andi Kleen	:	Some cleanups, cache destination entry
     *					for connect. 
     *	Vitaly E. Lavrov	:	Transparent proxy revived after year coma.
     *		Melvin Smith	:	Check msg_name not msg_namelen in sendto(),
     *					return ENOTCONN for unconnected sockets (POSIX)
     *		Janos Farkas	:	don't deliver multi/broadcasts to a different
     *					bound-to-device socket
     *	Hirokazu Takahashi	:	HW checksumming for outgoing UDP
     *					datagrams.
     *	Hirokazu Takahashi	:	sendfile() on UDP works now.
     *		Arnaldo C. Melo :	convert /proc/net/udp to seq_file
     *	YOSHIFUJI Hideaki @USAGI and:	Support IPV6_V6ONLY socket option, which
     *	Alexey Kuznetsov:		allow both IPv4 and IPv6 sockets to bind