Skip to content

Commit dc47180

Browse files
glarsennordicde-nordic
authored andcommitted
[nrf fromlist] net: conn_mgr: Reorganize files
Upstream PR: zephyrproject-rtos/zephyr#56549 Since conn_mgr is a subsystem rather than a library, relocate it directly into subsys/net rather than subsys/net/lib/ Rename header files to better match their function. Remove net_ prefix from conn_mgr types, API, and files, since it is unnecessary. Signed-off-by: Georges Oates_Larsen <[email protected]> (cherry picked from commit 7278bee)
1 parent 62ed73d commit dc47180

File tree

23 files changed

+53
-54
lines changed

23 files changed

+53
-54
lines changed

include/zephyr/net/net_conn_mgr.h renamed to include/zephyr/net/conn_mgr.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,25 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7-
#ifndef ZEPHYR_INCLUDE_NET_CONN_MGR_H_
8-
#define ZEPHYR_INCLUDE_NET_CONN_MGR_H_
7+
#ifndef ZEPHYR_INCLUDE_CONN_MGR_H_
8+
#define ZEPHYR_INCLUDE_CONN_MGR_H_
99

1010
#ifdef __cplusplus
1111
extern "C" {
1212
#endif
1313

1414
#if defined(CONFIG_NET_CONNECTION_MANAGER)
1515

16-
void net_conn_mgr_resend_status(void);
16+
void conn_mgr_resend_status(void);
1717

1818
#else
1919

20-
#define net_conn_mgr_resend_status(...)
20+
#define conn_mgr_resend_status(...)
2121

2222
#endif /* CONFIG_NET_CONNECTION_MANAGER */
2323

2424
#ifdef __cplusplus
2525
}
2626
#endif
2727

28-
#endif /* ZEPHYR_INCLUDE_NET_CONN_MGR_H_ */
28+
#endif /* ZEPHYR_INCLUDE_CONN_MGR_H_ */

include/zephyr/shell/shell_mqtt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include <zephyr/net/socket.h>
1313
#include <zephyr/net/net_mgmt.h>
1414
#include <zephyr/net/net_event.h>
15-
#include <zephyr/net/net_conn_mgr.h>
15+
#include <zephyr/net/conn_mgr.h>
1616
#include <zephyr/net/mqtt.h>
1717
#include <zephyr/sys/ring_buffer.h>
1818

samples/net/gsm_modem/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include <zephyr/drivers/uart.h>
1111
#include <zephyr/net/net_mgmt.h>
1212
#include <zephyr/net/net_event.h>
13-
#include <zephyr/net/net_conn_mgr.h>
13+
#include <zephyr/net/conn_mgr.h>
1414
#include <zephyr/drivers/modem/gsm_ppp.h>
1515
#include <zephyr/devicetree.h>
1616

samples/net/mqtt_sn_publisher/src/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
#include <zephyr/kernel.h>
1313
#include <zephyr/net/mqtt_sn.h>
14-
#include <zephyr/net/net_conn_mgr.h>
14+
#include <zephyr/net/conn_mgr.h>
1515
#include <zephyr/net/net_mgmt.h>
1616
#include <zephyr/net/socket.h>
1717

@@ -79,7 +79,7 @@ static void init_app(void)
7979
net_mgmt_init_event_callback(&mgmt_cb, net_event_handler, EVENT_MASK);
8080
net_mgmt_add_event_callback(&mgmt_cb);
8181

82-
net_conn_mgr_resend_status();
82+
conn_mgr_resend_status();
8383
}
8484
}
8585

samples/net/mqtt_sn_publisher/src/udp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include <stdio.h>
1111
#include <zephyr/kernel.h>
1212
#include <zephyr/net/mqtt_sn.h>
13-
#include <zephyr/net/net_conn_mgr.h>
13+
#include <zephyr/net/conn_mgr.h>
1414
#include <zephyr/net/net_mgmt.h>
1515
#include <zephyr/net/socket.h>
1616

samples/net/sockets/dumb_http_server_mt/src/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ LOG_MODULE_REGISTER(net_dumb_http_srv_mt_sample);
1616

1717
#include <zephyr/net/net_mgmt.h>
1818
#include <zephyr/net/net_event.h>
19-
#include <zephyr/net/net_conn_mgr.h>
19+
#include <zephyr/net/conn_mgr.h>
2020

2121
#define MY_PORT 8080
2222

@@ -426,7 +426,7 @@ int main(void)
426426
event_handler, EVENT_MASK);
427427
net_mgmt_add_event_callback(&mgmt_cb);
428428

429-
net_conn_mgr_resend_status();
429+
conn_mgr_resend_status();
430430
}
431431

432432
if (!IS_ENABLED(CONFIG_NET_CONNECTION_MANAGER)) {

samples/net/sockets/echo_client/src/echo-client.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ LOG_MODULE_REGISTER(net_echo_client_sample, LOG_LEVEL_DBG);
2929

3030
#include <zephyr/net/net_mgmt.h>
3131
#include <zephyr/net/net_event.h>
32-
#include <zephyr/net/net_conn_mgr.h>
32+
#include <zephyr/net/conn_mgr.h>
3333

3434
#if defined(CONFIG_USERSPACE)
3535
#include <zephyr/app_memory/app_memdomain.h>
@@ -271,7 +271,7 @@ static void init_app(void)
271271
event_handler, EVENT_MASK);
272272
net_mgmt_add_event_callback(&mgmt_cb);
273273

274-
net_conn_mgr_resend_status();
274+
conn_mgr_resend_status();
275275
}
276276

277277
init_vlan();

samples/net/sockets/echo_server/src/echo-server.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ LOG_MODULE_REGISTER(net_echo_server_sample, LOG_LEVEL_DBG);
2020

2121
#include <zephyr/net/net_mgmt.h>
2222
#include <zephyr/net/net_event.h>
23-
#include <zephyr/net/net_conn_mgr.h>
23+
#include <zephyr/net/conn_mgr.h>
2424

2525
#include "common.h"
2626
#include "certificate.h"
@@ -196,7 +196,7 @@ static void init_app(void)
196196
event_handler, EVENT_MASK);
197197
net_mgmt_add_event_callback(&mgmt_cb);
198198

199-
net_conn_mgr_resend_status();
199+
conn_mgr_resend_status();
200200
}
201201

202202
init_vlan();
@@ -210,7 +210,7 @@ static int cmd_sample_quit(const struct shell *sh,
210210
{
211211
want_to_quit = true;
212212

213-
net_conn_mgr_resend_status();
213+
conn_mgr_resend_status();
214214

215215
quit();
216216

samples/net/sockets/txtime/src/main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ LOG_MODULE_REGISTER(net_txtime_sample, LOG_LEVEL_DBG);
1616

1717
#include <zephyr/net/net_mgmt.h>
1818
#include <zephyr/net/net_event.h>
19-
#include <zephyr/net/net_conn_mgr.h>
19+
#include <zephyr/net/conn_mgr.h>
2020

2121
#include <zephyr/net/socket.h>
2222
#include <zephyr/net/ethernet.h>
@@ -497,7 +497,7 @@ static int cmd_sample_quit(const struct shell *sh,
497497

498498
quit();
499499

500-
net_conn_mgr_resend_status();
500+
conn_mgr_resend_status();
501501

502502
return 0;
503503
}
@@ -535,7 +535,7 @@ int main(void)
535535
net_mgmt_add_event_callback(&dhcpv4_cb);
536536
}
537537

538-
net_conn_mgr_resend_status();
538+
conn_mgr_resend_status();
539539
}
540540

541541
/* The VLAN in this example is created for demonstration purposes.

samples/subsys/mgmt/updatehub/src/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include <zephyr/mgmt/updatehub.h>
99
#include <zephyr/net/net_mgmt.h>
1010
#include <zephyr/net/net_event.h>
11-
#include <zephyr/net/net_conn_mgr.h>
11+
#include <zephyr/net/conn_mgr.h>
1212
#include <zephyr/net/wifi_mgmt.h>
1313

1414
#if defined(CONFIG_UPDATEHUB_DTLS)
@@ -150,6 +150,6 @@ int main(void)
150150

151151
net_mgmt_init_event_callback(&mgmt_cb, event_handler, EVENT_MASK);
152152
net_mgmt_add_event_callback(&mgmt_cb);
153-
net_conn_mgr_resend_status();
153+
conn_mgr_resend_status();
154154
return 0;
155155
}

0 commit comments

Comments
 (0)