![Logo](ti_logo.svg) |
AM243x MCU+ SDK
09.00.00
|
|
Go to the documentation of this file.
57 #ifndef CB_LLD_ETHERNET_H
58 #define CB_LLD_ETHERNET_H
60 #include <sys/types.h>
74 #define MAX_NUMBER_ENET_DEVS LLDENET_MAX_PORTS
76 #define CB_SOCKET_VALID(x) ((x)!=NULL)
77 #define CB_SOCKET_INVALID_VALUE NULL
78 #define CB_SOCKET_T lld_socket_t*
79 #define CB_ETHHDR_T struct ethhdr
80 #define CB_SOCKADDR_LL_T lld_sockaddr_t
81 #define CB_SOCK_SENDTO cb_lld_sendto
84 #define CB_IN_ADDR_T void*
89 #define ETH_DATA_LEN 1500
91 #define ETH_P_8021Q 0x8100
92 #define ETH_P_1588 0x88F7
93 #define ETH_P_TSN 0x22F0
94 #define ETH_P_NETLINK 0x22F1
96 #define CB_MAX_NETDEVNAME IFNAMSIZ
98 #define MKPIPE(x) (-1)
100 #define CB_LLD_MAX_ETH_FRAME_SIZE (1522U)
127 unsigned char sll_addr[6];
246 uint32_t enet_type, uint32_t instance_id);
349 #endif //CB_LLD_ETHERNET_H
int macport
Definition: cb_lld_ethernet.h:131
uint8_t h_dest[ETH_ALEN]
Definition: cb_lld_ethernet.h:109
uint16_t size
Definition: tisci_boardcfg.h:1
bool unusedDma
Definition: cb_lld_ethernet.h:217
uint16_t h_proto
Definition: cb_lld_ethernet.h:117
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.
Structure representing the lld_ethdev instance.
Definition: cb_lld_ethernet.h:155
TI Ethernet Low Level Driver abstract APIs.
int dmaTxChId
Definition: cb_lld_ethernet.h:208
struct lld_socket lld_socket_t
Structure representing the lld_socket instance.
Definition: cb_lld_ethernet.h:150
int tcid
Definition: cb_lld_ethernet.h:136
Ethernet header structure.
Definition: cb_lld_ethernet.h:105
uint32_t nRxPkts
Definition: cb_lld_ethernet.h:198
int cb_lld_netdev_to_macport(const char *netdev)
Convert net device name to mac port.
uint64_t addr
Definition: csl_udmap_tr.h:3
Definition: cb_lld_ethernet.h:141
char * netdev
Definition: cb_lld_ethernet.h:159
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 con...
uint16_t proto
Definition: cb_lld_ethernet.h:183
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()
typedef __attribute__
UInteger224 (802.1AS, 10.3.4 time-synchronization spanning tree priority vectors )
uint8_t h_source[ETH_ALEN]
Definition: cb_lld_ethernet.h:113
#define CB_SOCKADDR_LL_T
Definition: cb_lld_ethernet.h:80
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.
int(* cb_socket_lldcfg_update_cb_t)(cb_socket_lldcfg_update_t *update_cfg)
Callback function type for cb_socket_lldcfg_update.
Definition: cb_lld_ethernet.h:226
uint32_t pktSize
Definition: cb_lld_ethernet.h:203
Structure representing the lld_sockaddr instance.
Definition: cb_lld_ethernet.h:123
uint32_t nTxPkts
Definition: cb_lld_ethernet.h:193
int dmaRxChId
Definition: cb_lld_ethernet.h:213
uint8_t macport
Definition: cb_lld_ethernet.h:163
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.
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.
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.
Structure representing the cb_socket_lldcfg_update instance.
Definition: cb_lld_ethernet.h:173
#define ETH_ALEN
Definition: cb_lld_ethernet.h:87
int cb_lld_get_netdevs(char *netdevs[], int *len)
Get all virtual network interfaces which were defined for the TI platform.
uint16_t vlanid
Definition: cb_lld_ethernet.h:187
TI Timesync Low Level Driver abstract APIs.
uint32_t flags
Definition: csl_udmap_tr.h:0
int(* cb_ipcsocket_server_rdcb)(void *cbdata, uint8_t *rdata, int size, struct sockaddr *addr)
Definition: cb_lld_ethernet.h:143
int cb_lld_get_link_state(CB_SOCKET_T cfd, const char *dev, uint32_t *linkstate)
get link state from device name like 'eth0'
const char * dev
Definition: cb_lld_ethernet.h:178
#define CB_SOCKET_T
Definition: cb_lld_ethernet.h:78
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'