Detect and display host IP addresses (fixes #9) #17

Merged
luca0N merged 7 commits from dev_ip into dev 2025-11-20 23:41:49 +00:00
Owner

When a new host is detected, parse its IP address and display it in the web app.

  • Parse IPv4 addresses in libknock2
  • Parse IPv6 addresses in libknock2
  • Send IP addresses in the Knock2 server
  • Display IP addresses in the web app
When a new host is detected, parse its IP address and display it in the web app. - [x] Parse IPv4 addresses in libknock2 - ~Parse IPv6 addresses in libknock2~ - [x] Send IP addresses in the Knock<sup>2</sup> server - [x] Display IP addresses in the web app
luca0N self-assigned this 2025-11-19 22:36:03 +00:00
Move `mac_to_str' conversion function to a new source file called
`net_convert'.
Add missing @return documentation to the `is_broadcast_packet' function.
Parse ARP packet in libknock2 for IPv4 ARP packets to extract the host
IP address, and replace the reserved parameter in
`knock2_host_found_event_t' callback with the detected IP address (if
any).
luca0N removed this from the First Pre-Release project 2025-11-19 22:37:20 +00:00
luca0N changed title from Detect and display host IP addresses (fixes #9) to WIP: Detect and display host IP addresses (fixes #9) 2025-11-19 22:37:30 +00:00
In the libknock2 Makefile, add build instructions for `net_convert' and
`arp_utils', and have them linked into the final shared library.
In the Knock^2 server, send both the IP and MAC addresses when a
detected host is sent by libknock2, in the form of a JSON object (which
was previously a plain string, set to the host MAC address).  This
change was made by making the Knock2Packet struct a generic type, which
defines the type of its `Data'.
In the Knock^2 web client, display both the IP and MAC addresses for
each detected host, by parsing such values from the updated Knock^2
server packet format.
Author
Owner

The parsing of IPv6 addresses has been postponed, as IPv6 host announcement is usually done through Neighbor Discovery Protocol. As such, this feature is no longer planned for the first release of this software.

The parsing of IPv6 addresses has been postponed, as IPv6 host announcement is usually done through Neighbor Discovery Protocol. As such, this feature is no longer planned for the first release of this software.
Instead of having hosts' IP addresses being the primary identifier in
the web app, have their MAC address be the primary identifier instead.
This will be useful in the future if IPv6 support is added, since both
addresses could then be grouped in the same list item without having to
create another one.

Additionally, having the MAC address as the primary identifier makes
more sense, since a host can have multiple IP addresses, although
grouping IP addresses by host is not currently implemented.
luca0N changed title from WIP: Detect and display host IP addresses (fixes #9) to Detect and display host IP addresses (fixes #9) 2025-11-20 23:40:47 +00:00
Author
Owner

The MAC address is now used as the primary identifier in the web app host list. The rationale is detailed in the commit message f6a2837ee8.

The MAC address is now used as the primary identifier in the web app host list. The rationale is detailed in the commit message f6a2837ee8.
luca0N deleted branch dev_ip 2025-11-20 23:41:49 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
luca0N/lanbassador!17
No description provided.