11#ifndef ZEPHYR_INCLUDE_NET_NET_CONFIG_H_
12#define ZEPHYR_INCLUDE_NET_NET_CONFIG_H_
39#define NET_CONFIG_NEED_ROUTER 0x00000001
45#define NET_CONFIG_NEED_IPV6 0x00000002
51#define NET_CONFIG_NEED_IPV4 0x00000004
168#define NET_CONFIG_SSH_KEY_BUF_DEFINE_STATIC(name, key_bits) \
169 static uint8_t name[key_bits]
182#define NET_CONFIG_SSH_PASSWORD_AUTH_DEFINE_STATIC(name, user_name, pwd) \
183 static struct net_config_ssh_password_auth name = { \
184 .username = user_name, \
205#define NET_CONFIG_SSH_PRIV_KEY_DEFINE_STATIC(name, \
212 static struct net_config_ssh_key name = { \
213 .key_buf = _key_buf_name, \
214 .key_buf_len = _key_buf_len, \
215 .key_name = _key_name, \
217 .key_type = _key_type, \
218 .key_bits = _key_bits, \
219 .is_private = true, \
236#define NET_CONFIG_SSH_PUB_KEY_DEFINE_STATIC(name, \
241 static struct net_config_ssh_key name = { \
242 .key_buf = _key_buf_name, \
243 .key_buf_len = _key_buf_len, \
244 .key_name = _key_name, \
247 .is_private = false, \
272#if defined(CONFIG_SSH_SERVER)
286 ARG_UNUSED(priv_key_config);
287 ARG_UNUSED(pub_key_config);
288 ARG_UNUSED(password_auth_config);
289 ARG_UNUSED(sshd_instance);
int net_config_init(const char *app_info, uint32_t flags, int32_t timeout)
Initialize this network application.
int net_config_init_app(const struct device *dev, const char *app_info)
Initialize this network application.
static int net_config_init_sshd(struct net_if *iface, const struct net_config_ssh_key *priv_key_config, const struct net_config_ssh_key *pub_key_config, const struct net_config_ssh_password_auth *password_auth_config, int sshd_instance)
Initialize SSH server on the device.
Definition net_config.h:279
int net_config_init_by_iface(struct net_if *iface, const char *app_info, uint32_t flags, int32_t timeout)
Initialize this network application using a specific network interface.
ssh_host_key_type
Types of host keys that can be generated.
Definition keygen.h:29
#define ENOTSUP
Unsupported value.
Definition errno.h:114
Public API for network interface.
flags
Definition parser.h:97
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__INT32_TYPE__ int32_t
Definition stdint.h:74
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
Runtime device structure (in ROM) per driver instance.
Definition device.h:513
This contains key configuration data for sshd on the device.
Definition net_config.h:122
size_t key_buf_len
Size of the key buffer in bytes.
Definition net_config.h:138
bool is_private
Is private key?
Definition net_config.h:158
uint8_t * key_buf
Temp buffer for loading and saving keys.
Definition net_config.h:132
int key_id
Key id.
Definition net_config.h:143
int key_bits
Key size in bits.
Definition net_config.h:153
enum ssh_host_key_type key_type
Key type.
Definition net_config.h:148
const char * key_name
SSH key name.
Definition net_config.h:127
This contains configuration data for password authentication for sshd on the device.
Definition net_config.h:106
const char * password
Password to use for password authentication.
Definition net_config.h:116
const char * username
Username to use for password authentication.
Definition net_config.h:110
Network Interface structure.
Definition net_if.h:735