TI ENET LLD specific network layer part.
Go to the source code of this file.
Data Structures | |
struct | ethhdr |
Ethernet header structure. More... | |
struct | lld_sockaddr_t |
Structure representing the lld_sockaddr instance. More... | |
struct | sockaddr |
struct | lld_ethdev_t |
Structure representing the lld_ethdev instance. More... | |
struct | cb_socket_lldcfg_update_t |
Structure representing the cb_socket_lldcfg_update instance. More... | |
Macros | |
#define | htons __htons |
#define | ntohs __ntohs |
#define | htonl __htonl |
#define | ntohl __ntohl |
#define | MAX_NUMBER_ENET_DEVS LLDENET_MAX_PORTS |
#define | CB_SOCKET_VALID(x) ((x)!=NULL) |
#define | CB_SOCKET_INVALID_VALUE NULL |
#define | CB_SOCKET_T lld_socket_t* |
#define | CB_ETHHDR_T struct ethhdr |
#define | CB_SOCKADDR_LL_T lld_sockaddr_t |
#define | CB_SOCK_SENDTO cb_lld_sendto |
#define | CB_IN_ADDR_T void* |
#define | IFNAMSIZ 16 |
#define | ETH_ALEN 6 /* Octets in one ethernet addr */ |
#define | ETH_HLEN 14 /* Total octets in header. */ |
#define | ETH_DATA_LEN 1500 /* Max. octets in payload */ |
#define | ETH_P_8021Q 0x8100 /* 802.1Q VLAN Extended Header */ |
#define | ETH_P_1588 0x88F7 /* IEEE 1588 Timesync */ |
#define | ETH_P_TSN 0x22F0 /* TSN (IEEE 1722) packet */ |
#define | ETH_P_NETLINK 0x22F1 /* A virtual prototol for netlink rawsockt on TI platforms */ |
#define | CB_MAX_NETDEVNAME IFNAMSIZ |
#define | MKPIPE(x) (-1) |
#define | CB_LLD_MAX_ETH_FRAME_SIZE (1522U) |
Typedefs | |
typedef int(* | cb_ipcsocket_server_rdcb) (void *cbdata, uint8_t *rdata, int size, struct sockaddr *addr) |
typedef struct lld_socket | lld_socket_t |
Structure representing the lld_socket instance. More... | |
typedef int(* | cb_socket_lldcfg_update_cb_t) (cb_socket_lldcfg_update_t *update_cfg) |
Callback function type for cb_socket_lldcfg_update. More... | |
Functions | |
struct ethhdr | __attribute__ ((packed)) |
int | cb_lld_init_devs_table (lld_ethdev_t *ethdevs, uint32_t ndevs, uint32_t enet_type, uint32_t instance_id) |
Initialize a LLD device table. More... | |
int | cb_socket_set_lldcfg_update_cb (cb_socket_lldcfg_update_cb_t lldcfg_update_cb) |
This function sets the callback for updating LLD config parameters. It enables the user to update config parameters for the Enet LLD layer that are not supported by the CB socket. It is important to note that this function should only be called once. More... | |
int | cb_lld_netdev_to_macport (const char *netdev) |
Convert net device name to mac port. More... | |
int | cb_lld_sendto (CB_SOCKET_T sfd, void *sdata, int psize, int flags, CB_SOCKADDR_LL_T *addr, int addrsize) |
Send a TX ethernet L2 packet. More... | |
int | cb_lld_recv (CB_SOCKET_T sfd, void *buf, int size, int *port) |
Receive a RX ethernet L2 packet. This should be called after a rxnotify_cb is invoked. More... | |
int | cb_lld_set_txnotify_cb (CB_SOCKET_T sfd, void(*txnotify_cb)(void *arg), void *arg) |
Set the TX notify callback that is invoked when an TX packet is sent successfully. More... | |
int | cb_lld_set_rxnotify_cb (CB_SOCKET_T sfd, void(*rxnotify_cb)(void *arg), void *arg) |
Set the RX notify callback that is invoked when an RX packet is ready to be received. More... | |
int | cb_lld_get_type_instance (uint32_t *enet_type, uint32_t *instance_id) |
Get enet type and instance that is set via cb_lld_init_devs_table() More... | |
int | cb_lld_get_netdevs (char *netdevs[], int *len) |
Get all virtual network interfaces which were defined for the TI platform. More... | |
int | cb_lld_get_link_state (CB_SOCKET_T cfd, const char *dev, uint32_t *linkstate) |
get link state from device name like 'eth0' More... | |
int | cb_lld_get_link_info (CB_SOCKET_T cfd, const char *dev, uint32_t *speed, uint32_t *duplex) |
get link info(speed and duplex) from device name like 'eth0' More... | |
Variables | |
typedef | __attribute__ |
UInteger224 (802.1AS, 10.3.4 time-synchronization spanning tree priority vectors ) More... | |
uint8_t | h_dest [ETH_ALEN] |
uint8_t | h_source [ETH_ALEN] |
uint16_t | h_proto |
uint8_t h_dest[ETH_ALEN] |
Destination Ethernet address.
uint8_t h_source[ETH_ALEN] |
Source Ethernet address.
uint16_t h_proto |
Ethernet type in the ethernet frame