From 40497bf8d4cf43b2b3e579f868328c87e5e628da Mon Sep 17 00:00:00 2001
From: GUVWAF <thijs@havinga.eu>
Date: Mon, 18 Nov 2024 18:41:27 +0100
Subject: [PATCH] Add `next_hop` to NodeInfoLite

---
 meshtastic/deviceonly.options | 3 ++-
 meshtastic/deviceonly.proto   | 7 ++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/meshtastic/deviceonly.options b/meshtastic/deviceonly.options
index 82dffcf4..d6aae0c4 100644
--- a/meshtastic/deviceonly.options
+++ b/meshtastic/deviceonly.options
@@ -10,8 +10,9 @@
 
 *NodeInfoLite.channel int_size:8
 *NodeInfoLite.hops_away int_size:8
+*NodeInfoLite.next_hop int_size:8
 
 *UserLite.long_name max_size:40
 *UserLite.short_name max_size:5
 *UserLite.public_key max_size:32 # public key
-*UserLite.macaddr max_size:6 fixed_length:true
+*UserLite.macaddr max_size:6 fixed_length:true
\ No newline at end of file
diff --git a/meshtastic/deviceonly.proto b/meshtastic/deviceonly.proto
index 55aa9a77..c506137f 100644
--- a/meshtastic/deviceonly.proto
+++ b/meshtastic/deviceonly.proto
@@ -153,6 +153,11 @@ message NodeInfoLite {
    * Persists between NodeDB internal clean ups
    */
   bool is_ignored = 11;
+
+  /*
+   * Last byte of the node number of the node that should be used as the next hop to reach this node. 
+   */
+  uint32 next_hop = 12;
 }
 
 /*
@@ -237,4 +242,4 @@ message ChannelFile {
    * NodeDB.cpp in the device code.
    */
   uint32 version = 2;
-}
+}
\ No newline at end of file