BlinkenArea - GitList
Repositories
Blog
Wiki
mips_sys
Code
Commits
Branches
Tags
Search
Tree:
c2b0401
Branches
Tags
master
mips_sys
fw
ethernet.h
added file headers
Stefan Schuermans
commited
c2b0401
at 2012-04-08 11:54:40
ethernet.h
Blame
History
Raw
/* MIPS I system * Copyright 2011-2012 Stefan Schuermans <stefan@schuermans.info> * Copyleft GNU public license V2 or later * http://www.gnu.org/copyleft/gpl.html */ #ifndef ETHERNET_H #define ETHERNET_H /// header of ethernet packet struct ethernet_header { unsigned char dest[6]; unsigned char src[6]; unsigned short type; } __attribute__((packed)); /// ethernet packet struct ethernet_packet { struct ethernet_header eth_hdr; } __attribute__((packed)); /** * @brief process a received ethernet packet * @param[in] ptr pointer to data of packet * @param[in] sz size of packet */ void ethernet_recv(void *ptr, unsigned int sz); /** * @brief send an ethernet packet * @param[in] ptr pointer to data of packet * @param[in] sz size of packet * * ptr must point to a ethernet_packet * with eth_hdr.dest and eth_hdr.type already initialized */ void ethernet_send(void *ptr, unsigned int sz); #endif // #ifdef ETHERNET_H