From patchwork Thu Aug 4 18:52:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Lindner X-Patchwork-Id: 18505 X-Patchwork-Delegate: sw@simonwunderlich.de Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from diktynna.open-mesh.org (localhost [IPv6:::1]) by diktynna.open-mesh.org (Postfix) with ESMTP id A2F7182DFE; Thu, 4 Aug 2022 20:52:27 +0200 (CEST) Received: from s2.neomailbox.net (s2.neomailbox.net [5.148.176.60]) by diktynna.open-mesh.org (Postfix) with ESMTPS id 5682B80146 for ; Thu, 4 Aug 2022 20:52:23 +0200 (CEST) From: Marek Lindner To: b.a.t.m.a.n@lists.open-mesh.org Subject: [PATCH 1/3] alfred: add missing alfred_event_notify_v0 struct documentation Date: Thu, 4 Aug 2022 20:52:10 +0200 Message-Id: <20220804185212.3074514-1-mareklindner@neomailbox.ch> MIME-Version: 1.0 ARC-Seal: i=1; s=20121; d=open-mesh.org; t=1659639143; a=rsa-sha256; cv=none; b=n0IjdP1+T/UfvrCFapCyBMYpMnKRhJm7Sont2c4k5mQPWQX3YXYJrUsUq5ayWarQ81PqEt C9ETAoMOaWW8acwms10j8mlheJoRcYNyR0vrcfG74GOyZh1e1QvNqxOiMzDypcainAEfj3 zfDV75qdCRegmEunVYyMYBstSoviyjk= ARC-Authentication-Results: i=1; diktynna.open-mesh.org; dkim=none; spf=pass (diktynna.open-mesh.org: domain of mareklindner@neomailbox.ch designates 5.148.176.60 as permitted sender) smtp.mailfrom=mareklindner@neomailbox.ch; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=open-mesh.org; s=20121; t=1659639143; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=eaQxRbIVn1Tgn9srGhtHXReZa3LmwYLKlzI9lFKrS+o=; b=Fcm33kXwWxwmqZWcQiXsOCel6jI/XsfUqjOcWJk0oeUBCXrvn+ZlX4dXBuFDXEopwcevW8 G0gi7/oCM2XhEuFgmBNEpkdaIo2TgOrvPWBzPbdGT/BPxlC6hY2Zl+OaFuhIlUjcOrj50C yD5wd3HPV7Sb5smExMxe+kexfMk2UvU= Message-ID-Hash: X37AJLYB5IRB5V6AJAKGUMMSS6LJOWQW X-Message-ID-Hash: X37AJLYB5IRB5V6AJAKGUMMSS6LJOWQW X-MailFrom: mareklindner@neomailbox.ch X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-b.a.t.m.a.n.lists.open-mesh.org-0; header-match-b.a.t.m.a.n.lists.open-mesh.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: Marek Lindner X-Mailman-Version: 3.2.1 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Signed-off-by: Marek Lindner --- packet.h | 1 + 1 file changed, 1 insertion(+) diff --git a/packet.h b/packet.h index b8d528e..c0723b8 100644 --- a/packet.h +++ b/packet.h @@ -247,6 +247,7 @@ struct alfred_event_register_v0 { * struct alfred_event_notify_v0 - event notification message * @header: TLV header describing the complete packet * @type: Type of the data triggering the event + * @source: Mac address of the original source of the data * * Sent by the daemon to client on data record update */ From patchwork Thu Aug 4 18:52:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Lindner X-Patchwork-Id: 18506 X-Patchwork-Delegate: sw@simonwunderlich.de Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from diktynna.open-mesh.org (localhost [IPv6:::1]) by diktynna.open-mesh.org (Postfix) with ESMTP id 84EB883DAC; Thu, 4 Aug 2022 20:52:33 +0200 (CEST) Received: from s2.neomailbox.net (s2.neomailbox.net [5.148.176.60]) by diktynna.open-mesh.org (Postfix) with ESMTPS id A83AA83D8C for ; Thu, 4 Aug 2022 20:52:29 +0200 (CEST) From: Marek Lindner To: b.a.t.m.a.n@lists.open-mesh.org Subject: [PATCH 2/3] alfred: fix erroneous documentation of '-r' argument Date: Thu, 4 Aug 2022 20:52:11 +0200 Message-Id: <20220804185212.3074514-2-mareklindner@neomailbox.ch> In-Reply-To: <20220804185212.3074514-1-mareklindner@neomailbox.ch> References: <20220804185212.3074514-1-mareklindner@neomailbox.ch> MIME-Version: 1.0 ARC-Seal: i=1; s=20121; d=open-mesh.org; t=1659639149; a=rsa-sha256; cv=none; b=od3Oc0yGser8rq2jVRi841HMDmohDH36YAtCTBlhVviiRFEq447HXg7ImgwW0go1mcwreO No06N/ycuMkstn8CbX+1FMUGrNnZM0V8wkMXebvemk2cSgvgDSzI2PPXLg5GfzMjBnEaEz hn6YIgpsFi7GX2Puw7RsbbtxsksbwxU= ARC-Authentication-Results: i=1; diktynna.open-mesh.org; dkim=none; spf=pass (diktynna.open-mesh.org: domain of mareklindner@neomailbox.ch designates 5.148.176.60 as permitted sender) smtp.mailfrom=mareklindner@neomailbox.ch; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=open-mesh.org; s=20121; t=1659639149; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=S8lg1Q8rDqqK+njqjgQWRuXQy58WHxCDWMSmjooaL/E=; b=IoIGuUlxKGgZpHZA+WXpgKpJO888cDImyxa7BzBT4r4uL5n6ns21rGgzniGBCiPAnPigM+ jXRt2LYR1VSK9kCPXiVDZuqncIAYkNnVXbyKVnqYySkzdpctdn3D7sUjPdyqe0DUV8e0Nu VEi3y0/BVzc1hrYPLJGEFxZyYtvz4Uo= Message-ID-Hash: EIWOETP72E27AXTEI52WN7OWQSWQFY7G X-Message-ID-Hash: EIWOETP72E27AXTEI52WN7OWQSWQFY7G X-MailFrom: mareklindner@neomailbox.ch X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-b.a.t.m.a.n.lists.open-mesh.org-0; header-match-b.a.t.m.a.n.lists.open-mesh.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: Marek Lindner X-Mailman-Version: 3.2.1 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Signed-off-by: Marek Lindner --- main.c | 2 +- man/alfred.8 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 3fe7b42..2c3f06e 100644 --- a/main.c +++ b/main.c @@ -31,7 +31,7 @@ static void alfred_usage(void) printf(" -s, --set-data [data type] sets new data to distribute from stdin\n"); printf(" for the supplied data type (0-255)\n"); printf(" -r, --request [data type] collect data from the network and prints\n"); - printf(" it on the network\n"); + printf(" it on stdout\n"); printf(" -d, --verbose Show extra information in the data output\n"); printf(" -V, --req-version specify the data version set for -s\n"); printf(" -M, --modeswitch primary switch daemon to mode primary\n"); diff --git a/man/alfred.8 b/man/alfred.8 index ca83f02..20c703b 100644 --- a/man/alfred.8 +++ b/man/alfred.8 @@ -67,7 +67,7 @@ must be periodically written again to alfred, otherwise it will timeout and alfred will forget about it (after 10 minutes). .TP \fB\-r\fP, \fB\-\-request\fP \fIdata\-type\fP -Collect data from the network and prints it on the network +Collect data from the network and prints it on stdout .TP \fB\-d\fP, \fB\-\-verbose\fP Show extra information in the data output From patchwork Thu Aug 4 18:52:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marek Lindner X-Patchwork-Id: 18507 X-Patchwork-Delegate: sw@simonwunderlich.de Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from diktynna.open-mesh.org (localhost [IPv6:::1]) by diktynna.open-mesh.org (Postfix) with ESMTP id 93C1083EB8; Thu, 4 Aug 2022 20:52:37 +0200 (CEST) Received: from s2.neomailbox.net (s2.neomailbox.net [5.148.176.60]) by diktynna.open-mesh.org (Postfix) with ESMTPS id 83F4383EB2 for ; Thu, 4 Aug 2022 20:52:35 +0200 (CEST) From: Marek Lindner To: b.a.t.m.a.n@lists.open-mesh.org Subject: [PATCH 3/3] alfred: mismaching declarations of is_valid_ether_addr() Date: Thu, 4 Aug 2022 20:52:12 +0200 Message-Id: <20220804185212.3074514-3-mareklindner@neomailbox.ch> In-Reply-To: <20220804185212.3074514-1-mareklindner@neomailbox.ch> References: <20220804185212.3074514-1-mareklindner@neomailbox.ch> MIME-Version: 1.0 ARC-Seal: i=1; s=20121; d=open-mesh.org; t=1659639155; a=rsa-sha256; cv=none; b=W8QFEWMwf92vhzZqK/JejGXazBP1Os3PBmCiukr9YAcY7Gebw2vVhdmwQnQJ1hGX6+OT2k ydwjUxKd/YxeF8pjoc8sf0pBdTPKUis5dpahZ+ZD67+ozG9HRnl7mzEdLs9Lz4v4adL0Zp 34C7wOGzaiI+AI/+VcvgelqsjRX21cA= ARC-Authentication-Results: i=1; diktynna.open-mesh.org; dkim=none; spf=pass (diktynna.open-mesh.org: domain of mareklindner@neomailbox.ch designates 5.148.176.60 as permitted sender) smtp.mailfrom=mareklindner@neomailbox.ch; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=open-mesh.org; s=20121; t=1659639155; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=37EblC0nWKXTYOQVCa6moOu7y6YVe4yTZZ/qjNydas8=; b=FsW2xQhRS11cdsjyqLX7SuQyhqnHA2VTUBXV+0S/mJ3K4uE6wSIt7N/c1Q91n4nqpZSFWc WZJf2bpLaHWDdGpgYukKNYXoSsIljp+hDmn1+3XY+959wGNPYcVV4z8X2ARbE1qbDEaGkK 91oLf8S348ObCrhKkcItEhtB7e3S3jo= Message-ID-Hash: HSKJW3NMZT7C4FSTJRYFI4N4SICM2UWS X-Message-ID-Hash: HSKJW3NMZT7C4FSTJRYFI4N4SICM2UWS X-MailFrom: mareklindner@neomailbox.ch X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-b.a.t.m.a.n.lists.open-mesh.org-0; header-match-b.a.t.m.a.n.lists.open-mesh.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: Marek Lindner X-Mailman-Version: 3.2.1 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: util.c:57:34: warning: argument 1 of type ‘uint8_t[6]’ {aka ‘unsigned char[6]’} with mismatched bound [-Warray-parameter=] 57 | bool is_valid_ether_addr(uint8_t addr[ETH_ALEN]) | ~~~~~~~~^~~~~~~~~~~~~~ In file included from util.c:20: alfred.h:231:35: note: previously declared as ‘uint8_t *’ {aka ‘unsigned char *’} 231 | bool is_valid_ether_addr(uint8_t *addr); | ~~~~~~~~~^~~~ Signed-off-by: Marek Lindner --- alfred.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alfred.h b/alfred.h index 6fb57ce..97f0093 100644 --- a/alfred.h +++ b/alfred.h @@ -228,7 +228,7 @@ int time_diff(struct timespec *tv1, struct timespec *tv2, struct timespec *tvdiff); void time_random_seed(void); uint16_t get_random_id(void); -bool is_valid_ether_addr(uint8_t *addr); +bool is_valid_ether_addr(uint8_t addr[ETH_ALEN]); bool is_iface_disabled(char *iface); int ipv4_arp_request(struct interface *interface, const alfred_addr *addr, struct ether_addr *mac);