mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-09 20:01:56 +00:00
Split out definition of net_app_init() and its parameter flags from
net_app.h header to new net_config.h header. As we do this, rename
the function to net_config_init() and flags to NET_CONFIG_NEED_*.
This is a second step in splitting out network configuration API
out of net_app API, started in the c60df1311
commit.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
53 lines
1.0 KiB
C
53 lines
1.0 KiB
C
/** @file
|
|
* @brief Routines for network subsystem initialization.
|
|
*/
|
|
|
|
/*
|
|
* Copyright (c) 2017 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#ifndef __NET_CONFIG_H
|
|
#define __NET_CONFIG_H
|
|
|
|
#include <zephyr/types.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/**
|
|
* @brief Network configuration library
|
|
* @defgroup net_config Network Configuration Library
|
|
* @ingroup networking
|
|
* @{
|
|
*/
|
|
|
|
/** Flags that tell what kind of functionality is needed by the client. */
|
|
#define NET_CONFIG_NEED_ROUTER 0x00000001
|
|
#define NET_CONFIG_NEED_IPV6 0x00000002
|
|
#define NET_CONFIG_NEED_IPV4 0x00000004
|
|
|
|
/**
|
|
* @brief Initialize this network application.
|
|
*
|
|
* @param app_info String describing this application.
|
|
* @param flags Flags related to services needed by the client.
|
|
* @param timeout How long to wait the network setup before continuing
|
|
* the startup.
|
|
*
|
|
* @return 0 if ok, <0 if error.
|
|
*/
|
|
int net_config_init(const char *app_info, u32_t flags, s32_t timeout);
|
|
|
|
/**
|
|
* @}
|
|
*/
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* __NET_CONFIG_H */
|