The NetBSD Project

CVS log for src/sys/kern/uipc_socket.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / kern

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: netbsd-8


Revision 1.255.2.3 / (download) - annotate - [select for diffs], Sat Jun 9 15:16:30 2018 UTC (8 days, 7 hours ago) by martin
Branch: netbsd-8
Changes since 1.255.2.2: +13 -7 lines
Diff to previous 1.255.2.2 (colored) to branchpoint 1.255 (colored) next main 1.256 (colored)

Pull up following revision(s) (requested by roy in ticket #868):

	sys/sys/socketvar.h: revision 1.156
	sys/kern/uipc_socket2.c: revision 1.130
	sys/kern/uipc_socket.c: revision 1.264

Separate receive socket errors from general socket errors.

Revision 1.255.2.2 / (download) - annotate - [select for diffs], Mon Apr 9 13:34:10 2018 UTC (2 months, 1 week ago) by bouyer
Branch: netbsd-8
CVS Tags: netbsd-8-0-RC1
Changes since 1.255.2.1: +5 -6 lines
Diff to previous 1.255.2.1 (colored) to branchpoint 1.255 (colored)

Pull up following revision(s) (requested by roy in ticket #724):
	tests/net/icmp/t_ping.c: revision 1.19
	sys/netinet6/raw_ip6.c: revision 1.166
	sys/netinet6/ip6_input.c: revision 1.195
	sys/net/raw_usrreq.c: revision 1.59
	sys/sys/socketvar.h: revision 1.151
	sys/kern/uipc_socket2.c: revision 1.128
	tests/lib/libc/sys/t_recvmmsg.c: revision 1.2
	lib/libc/sys/recv.2: revision 1.38
	sys/net/rtsock.c: revision 1.239
	sys/netinet/udp_usrreq.c: revision 1.246
	sys/netinet6/icmp6.c: revision 1.224
	tests/net/icmp/t_ping.c: revision 1.20
	sys/netipsec/keysock.c: revision 1.63
	sys/netinet/raw_ip.c: revision 1.172
	sys/kern/uipc_socket.c: revision 1.260
	tests/net/icmp/t_ping.c: revision 1.22
	sys/kern/uipc_socket.c: revision 1.261
	tests/net/icmp/t_ping.c: revision 1.23
	sys/netinet/ip_mroute.c: revision 1.155
	sbin/route/route.c: revision 1.159
	sys/netinet6/ip6_mroute.c: revision 1.123
	sys/netatalk/ddp_input.c: revision 1.31
	sys/netcan/can.c: revision 1.3
	sys/kern/uipc_usrreq.c: revision 1.184
	sys/netinet6/udp6_usrreq.c: revision 1.138
	tests/net/icmp/t_ping.c: revision 1.18
socket: report receive buffer overflows
Add soroverflow() which increments the overflow counter, sets so_error
to ENOBUFS and wakes the receive socket up.
Replace all code that manually increments this counter with soroverflow().
Add soroverflow() to raw_input().
This allows userland to detect route(4) overflows so it can re-sync
with the current state.
socket: clear error even when peeking
The error has already been reported and it's pointless requiring another
recv(2) call just to clear it.
socket: remove now incorrect comment that so_error is only udp
As it can be affected by route(4) sockets which are raw.
rtsock: log dropped messages that we cannot report to userland
Handle ENOBUFS when receiving messages.
Don't send messages if the receiver has died.
Sprinkle more soroverflow().
Handle ENOBUFS in recv
Handle ENOBUFS in sendto
Note value received. Harden another sendto for ENOBUFS.
Handle the routing socket overflowing gracefully.
Allow a valid sendto .... duh
Handle errors better.
Fix test for checking we sent all the data we asked to.

Revision 1.255.2.1 / (download) - annotate - [select for diffs], Sun Mar 18 10:57:01 2018 UTC (3 months ago) by martin
Branch: netbsd-8
Changes since 1.255: +11 -4 lines
Diff to previous 1.255 (colored)

Pull up following revision(s) (requested by tih in ticket #639):
	sys/kern/uipc_socket.c: revision 1.258
	sys/kern/uipc_socket.c: revision 1.259
	sys/netinet/ip_input.c: revision 1.364 (via patch)
	sys/netinet/ip_output.c: revision 1.289
	sys/netinet/in.h: revision 1.102
	sys/netinet/in_pcb.c: revision 1.181
	share/man/man9/sockopt.9: revision 1.11
	sys/netinet/in_pcb.h: revision 1.65
	sys/sys/socketvar.h: revision 1.146
	sys/kern/uipc_syscalls.c: revision 1.189
	sys/netinet/ip_output.c: revision 1.290
	share/man/man4/ip.4: revision 1.41
	share/man/man4/ip.4: revision 1.42
	sys/kern/uipc_syscalls.c: revision 1.190

pass valsize for getsockopt like we do for setsockopt
make sure that we have enough space, don't require the exact size
(Tom Ivar Helbekkmo)

1) "#define ipi_spec_dst ipi_addr" in <netinet/in.h>
2) Change the IP_RECVPKTINFO option to control the generation of
   IP_PKTINFO control messages, the way it's done in Solaris.
3) Remove the superfluous IP_RECVPKTINFO control message.
4) Change the IP_PKTINFO option to do different things depending on
   the parameter it's supplied with:
   - If it's sizeof(int), assume it's being used as in Linux:
     - If it's non-zero, turn on the IP_RECVPKTINFO option.
     - If it's zero, turn off the IP_RECVPKTINFO option.
   - If it's sizeof(struct in_pktinfo), assume it's being used as in
     Solaris, to set a default for the source interface and/or
     source address for outgoing packets on the socket.
5) Return what Linux or Solaris compatible code expects, depending
   on data size, and just added a fallback to a Linux (and current NetBSD)
   compatible value if the size is unknown (as it is now), or,
   in the future, if the calling application specifies a receiving
   buffer that doesn't match either data item.

From: Tom Ivar Helbekkmo

new sentence-new line

Remove comment now that the getsockopt code passes the size.

Add a new sockopt member to keep track of the actual size of the option
that should be returned to the caller in getsockopt(2).
(Tom Ivar Helbekkmo)

Revision 1.255 / (download) - annotate - [select for diffs], Sat May 27 21:02:56 2017 UTC (12 months, 3 weeks ago) by bouyer
Branch: MAIN
CVS Tags: netbsd-8-base, matt-nb8-mediatek-base, matt-nb8-mediatek
Branch point for: netbsd-8
Changes since 1.254: +3 -2 lines
Diff to previous 1.254 (colored)

merge the bouyer-socketcan branch to HEAD.

CAN stands for Controller Area Network, a broadcast network used
in automation and automotive fields. For example, the NMEA2000 standard
developped for marine devices uses a CAN network as the link layer.

This is an implementation of the linux socketcan API:
https://www.kernel.org/doc/Documentation/networking/can.txt
you can also see can(4).

This adds a new socket family (AF_CAN) and protocol (PF_CAN),
as well as the canconfig(8) utility, used to set timing parameter of
CAN hardware. Also inclued is a driver for the CAN controller
found in the allwinner A20 SoC (I tested it with an Olimex lime2 board,
connected with PIC18-based CAN devices).

There is also the canloop(4) pseudo-device, which allows to use
the socketcan API without CAN hardware.

At this time the CANFD part of the linux socketcan API is not implemented.
Error frames are not implemented either. But I could get the cansend and
canreceive utilities from the canutils package to build and run with minimal
changes. tcpudmp(8) can also be used to record frames, which can be
decoded with etherreal.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>