blob: 71d6ecf9ccf46369ac819512ae5b8cc00559e506 [file] [log] [blame]
/** @file
* @brief Socket CAN definitions.
*
* Definitions for socket CAN support.
*/
/*
* Copyright (c) 2019 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_INCLUDE_NET_SOCKET_CAN_H_
#define ZEPHYR_INCLUDE_NET_SOCKET_CAN_H_
#include <zephyr/types.h>
#include <zephyr/net/net_ip.h>
#include <zephyr/net/net_if.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Socket CAN library
* @defgroup socket_can Network Core Library
* @ingroup networking
* @{
*/
/* Protocols of the protocol family PF_CAN */
#define CAN_RAW 1
/* Socket CAN options */
#define SOL_CAN_BASE 100
#define SOL_CAN_RAW (SOL_CAN_BASE + CAN_RAW)
enum {
CAN_RAW_FILTER = 1,
};
/* Socket CAN MTU size */
#define CAN_MTU CAN_MAX_DLEN
/**
* struct sockaddr_can - The sockaddr structure for CAN sockets
*
*/
struct sockaddr_can {
sa_family_t can_family;
int can_ifindex;
};
/**
* @}
*/
#ifdef __cplusplus
}
#endif
#endif /* ZEPHYR_INCLUDE_NET_SOCKET_CAN_H_ */