freebsd-src/sys/netlink
Gleb Smirnoff 0fac350c54 sockets: don't malloc/free sockaddr memory on getpeername/getsockname
Just like it was done for accept(2) in cfb1e92912, use same approach
for two simplier syscalls that return socket addresses.  Although,
these two syscalls aren't performance critical, this change generalizes
some code between 3 syscalls trimming code size.

Following example of accept(2), provide VNET-aware and INVARIANT-checking
wrappers sopeeraddr() and sosockaddr() around protosw methods.

Reviewed by:		tuexen
Differential Revision:	https://reviews.freebsd.org/D42694
2023-11-30 08:31:10 -08:00
..
route netlink: fix adding an interface route 2023-11-28 16:11:55 -05:00
ktest_netlink_message_writer.c netlink: move NETLINK define to opt_global.h 2023-10-13 09:23:47 +02:00
ktest_netlink_message_writer.h netlink: use netlink mbufs in the mbuf chains. 2023-06-02 13:14:20 +00:00
netlink.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
netlink_bitset.h netlink: dump interface capabilities with other interface data. 2023-06-16 15:33:49 +00:00
netlink_ctl.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
netlink_debug.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
netlink_domain.c sockets: don't malloc/free sockaddr memory on getpeername/getsockname 2023-11-30 08:31:10 -08:00
netlink_generic.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
netlink_generic.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
netlink_generic_kpi.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
netlink_glue.c netlink: move NETLINK define to opt_global.h 2023-10-13 09:23:47 +02:00
netlink_io.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
netlink_linux.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
netlink_message_parser.c netlink: add attr parser utility functions 2023-10-17 08:47:46 +02:00
netlink_message_parser.h netlink: descend into nested parsers when verifying 2023-10-17 08:47:48 +02:00
netlink_message_writer.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
netlink_message_writer.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
netlink_module.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
netlink_route.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
netlink_route.h netlink: dump interface capabilities with other interface data. 2023-06-16 15:33:49 +00:00
netlink_snl.h netlink: Align allocations on __max_align_t, not uint64_t. 2023-08-10 11:12:52 -07:00
netlink_snl_generic.h netlink: cope with growing requests 2023-10-17 08:47:52 +02:00
netlink_snl_route.h netlink: add IPv4/IPv6 attribute writers using in[6]_addr instead of 2023-05-19 09:45:49 +00:00
netlink_snl_route_compat.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
netlink_snl_route_parsers.h netlink: dump interface capabilities with other interface data. 2023-06-16 15:33:49 +00:00
netlink_sysevent.c kern: Move devctl_systems[] out of sys/sys/devctl.h 2023-06-08 12:28:04 -04:00
netlink_sysevent.h nlsysevent: add default command to the events 2023-06-02 14:22:10 +02:00
netlink_var.h netlink: use custom uma zone for the mbuf storage. 2023-06-01 06:43:39 +00:00