hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit f30b4e006488666ef10c399b6a809fc84066201f
parent 2df85f435b0a78f122f03b92757eb17f8506764e
Author: Tom Lebreux <me@tomlebreux.com>
Date:   Sat, 18 Feb 2023 08:32:17 -0500

net: add setname

Signed-off-by: Tom Lebreux <me@tomlebreux.com>

Diffstat:
Mnet/msg.ha | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/net/msg.ha b/net/msg.ha @@ -59,6 +59,12 @@ export fn getflags(msg: *msghdr) int = { return msg.native.msg_flags; }; +// Sets name for this message. +export fn setname(msg: *msghdr, name: *void, length: size) void = { + msg.native.msg_name = name; + msg.native.msg_namelen = length: u32; +}; + // Adds a control message of the desired length to a [[msghdr]], returning a // buffer in which the ancillary data may be written in a domain-specific // format.