Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions modules/openthread/platform/infra_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,21 +392,21 @@ static void remove_checksums_for_eth_offloading(uint8_t *buf, uint16_t len)
}

switch (ipv4_hdr->proto) {
case IPPROTO_ICMP:
case NET_IPPROTO_ICMP:
if ((config.chksum_support & NET_IF_CHECKSUM_IPV4_ICMP) != 0) {
struct net_icmp_hdr *icmp_hdr = (struct net_icmp_hdr *)pkt_cursor;

icmp_hdr->chksum = 0;
}
break;
case IPPROTO_UDP:
case NET_IPPROTO_UDP:
if ((config.chksum_support & NET_IF_CHECKSUM_IPV4_UDP) != 0) {
struct net_udp_hdr *udp_hdr = (struct net_udp_hdr *)pkt_cursor;

udp_hdr->chksum = 0;
}
break;
case IPPROTO_TCP:
case NET_IPPROTO_TCP:
if ((config.chksum_support & NET_IF_CHECKSUM_IPV4_TCP) != 0) {
struct net_tcp_hdr *tcp_hdr = (struct net_tcp_hdr *)pkt_cursor;

Expand Down
2 changes: 0 additions & 2 deletions samples/net/latmon/prj.conf
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2025 Jorge Ramirez-Ortiz <[email protected]>

CONFIG_POSIX_API=y

# General config
CONFIG_LOG=y
CONFIG_GPIO=y
Expand Down
3 changes: 1 addition & 2 deletions samples/net/latmon/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ LOG_MODULE_REGISTER(sample_latmon, LOG_LEVEL_DBG);
#include <zephyr/net/socket.h>
#include <zephyr/spinlock.h>
#include <zephyr/sys/atomic.h>
#include <zephyr/posix/unistd.h>

/*
* Blink Control
Expand Down Expand Up @@ -267,7 +266,7 @@ int main(void)
}
out:
k_thread_abort(blink_tid);
close(socket);
zsock_close(socket);

return ret;
}
4 changes: 2 additions & 2 deletions subsys/net/lib/latmon/latmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ static int broadcast_ip_address(struct net_in_addr *ip_addr)
return -1;
}

broadcast.sin_addr.s_addr = net_htonl(INADDR_BROADCAST);
broadcast.sin_addr.s_addr = net_htonl(NET_INADDR_BROADCAST);
broadcast.sin_port = net_htons(LATMON_NET_PORT);
broadcast.sin_family = NET_AF_INET;

Expand Down Expand Up @@ -381,7 +381,7 @@ int net_latmon_get_socket(struct net_sockaddr *connection_addr)
return -1;
}

zsock_setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on));
zsock_setsockopt(s, ZSOCK_SOL_SOCKET, ZSOCK_SO_REUSEADDR, &on, sizeof(on));
if (zsock_bind(s, (struct net_sockaddr *)&addr, sizeof(addr)) < 0) {
LOG_ERR("failed to bind latmon socket : %d", errno);
zsock_close(s);
Expand Down
4 changes: 3 additions & 1 deletion tests/net/all/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ CONFIG_ENTROPY_GENERATOR=y
CONFIG_TEST_RANDOM_GENERATOR=y
CONFIG_ZTEST=y
CONFIG_LOG_DEFAULT_LEVEL=4
CONFIG_MAX_THREAD_BYTES=4
CONFIG_MAX_THREAD_BYTES=6
CONFIG_POSIX_API=y

# TLS configuration
Expand Down Expand Up @@ -688,3 +688,5 @@ CONFIG_SHELL_BACKEND_TELNET=y

CONFIG_TFTP_LIB=y
CONFIG_NET_PKT_FILTER=y

CONFIG_NET_LATMON=y
1 change: 0 additions & 1 deletion tests/net/all/testcase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,3 @@ tests:
- CONFIG_NET_ROUTE_MCAST=y
- CONFIG_OPENTHREAD_SHELL=y
- CONFIG_DNS_RESOLVER_PACKET_FORWARDING=y
- CONFIG_MAX_THREAD_BYTES=5
Loading