BlinkenArea - GitList
Repositories
Blog
Wiki
mips_sys
Code
Commits
Branches
Tags
Search
Tree:
55a4ef9
Branches
Tags
master
mips_sys
fw
eth.h
added padding of ethernet packets to 60 bytes data min ARP is working now
Stefan Schuermans
commited
55a4ef9
at 2012-03-21 21:43:38
eth.h
Blame
History
Raw
#ifndef ETH_H #define ETH_H /** initialize MAC address */ void eth_mac_init(void); /** initialize receiver */ void eth_rx_init(void); /** initialize transmitter */ void eth_tx_init(void); /** * @brief get next received packet * @param[out] *pptr pointer to packet data * @param[out] *psz size of packet * @return if a packet was received */ int eth_rx(void **pptr, unsigned int *psz); /** * @brief transmit packet * @param[in] ptr pointer to packet data * @param[in] sz size of packet * * Padding will be appended if sz is not a multiple of 4 or smaller 60 bytes. * The buffer pointed to by ptr must be sufficiently large. */ void eth_tx(const void *ptr, unsigned int sz); /** get number of received packets */ unsigned int eth_rx_get_cnt(void); /** get number of transmitted packets */ unsigned int eth_tx_get_cnt(void); #endif /* #ifndef ETH_H */