History log of /freebsd/sys/netlink/netlink_snl_generic.h (Results 1 – 9 of 9)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# d521362f 20-Jan-2025 Gleb Smirnoff <glebius@FreeBSD.org>

netlink: fix build

The commit checked in had a dependency on not yet reviewed changes.
Revert them, but the main gist of the commit is not reverted.

Fixes: f2a4eed3e13b6aeb9ddeef580d3b931cf22a14e3


# f2a4eed3 20-Jan-2025 Gleb Smirnoff <glebius@FreeBSD.org>

netlink: underscore snl_get_genl_family_info() to discourage its use

This function uses already supposedly opaque struct _getfamily_attrs as
the argument and it fills it with pointers to volatile me

netlink: underscore snl_get_genl_family_info() to discourage its use

This function uses already supposedly opaque struct _getfamily_attrs as
the argument and it fills it with pointers to volatile memory, which makes
it is unsafe for general use. While here also underscore structures that
hang off the struct _getfamily_attrs.

Small programs like powerd(8) and RPC daemons are converted to use
snl_get_genl_mcast_group() and/or snl_get_genl_family(). The genl(1)
utility was fixed not to mix its own parsers with parsers declared in
netlink_snl_generic.h.

Reviewed by: melifaro
Differential Revision: https://reviews.freebsd.org/D48480

show more ...


# 90b1df4f 16-Jan-2025 Gleb Smirnoff <glebius@FreeBSD.org>

netlink: small cleanup of generic snl(3)

- Add const qualifiers for the family/group name pointers.
- Break & tab long lines.

No functional changes.


# 26d1ad5a 11-Jan-2025 Gleb Smirnoff <glebius@FreeBSD.org>

netlink: snl_create_genl_msg_request() may fail due to ENOMEM

Reviewed by: melifaro
Differential Revision: https://reviews.freebsd.org/D48310


# 8a8d0957 11-Jan-2025 Gleb Smirnoff <glebius@FreeBSD.org>

netlink: add snl(3) primitive to obtain group ID

using the family name and the group name as lookup arguments.

Reviewed by: melifaro
Differential Revision: https://reviews.freebsd.org/D48308


Revision tags: release/14.2.0, release/13.4.0, release/14.1.0, release/13.3.0, release/14.0.0
# 4f8f43b0 16-Oct-2023 Kristof Provost <kp@FreeBSD.org>

netlink: cope with growing requests

If a request ends up growing beyong the initially allocated space the
netlink functions (such as snl_add_msg_attr_u32()) will allocate a
new buffer. This invalida

netlink: cope with growing requests

If a request ends up growing beyong the initially allocated space the
netlink functions (such as snl_add_msg_attr_u32()) will allocate a
new buffer. This invalidates the header pointer we can have received
from snl_create_msg_request(). Always use the hdr returned by
snl_finalize_msg().

Reviewed by: melifaro
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D42223

show more ...


# 7ee6b0f1 27-May-2023 Alexander V. Chernikov <melifaro@FreeBSD.org>

netlink: add snl(3) support for listing genetlink multicast groups

Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D40282
MFC after: 2 weeks


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix

show more ...


Revision tags: release/13.2.0
# 73ae25c1 15-Mar-2023 Alexander V. Chernikov <melifaro@FreeBSD.org>

netlink: improve snl(3)

Summary:
* add snl_send_message() as a convenient send wrapper
* add signed integer parsers
* add snl_read_reply_code() to simplify operation result checks
* add snl_read_rep

netlink: improve snl(3)

Summary:
* add snl_send_message() as a convenient send wrapper
* add signed integer parsers
* add snl_read_reply_code() to simplify operation result checks
* add snl_read_reply_multi() to simplify reading multipart messages
* add snl_create_genl_msg_request()
* add snl_get_genl_family() to simplify family name->id resolution
* add tests for some of the functionality

Reviewed by: kp
Differential Revision: https://reviews.freebsd.org/D39092
MFC after: 2 weeks

show more ...