Changeset 1493811 in mainline for uspace/srv/ethip/ethip.h


Ignore:
Timestamp:
2012-02-11T19:11:08Z (12 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4f64a523
Parents:
e767dbf
Message:

Ethernet PDU encoding and decoding.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/ethip/ethip.h

    re767dbf r1493811  
    2727 */
    2828
    29 /** @addtogroup inet
     29/** @addtogroup ethip
    3030 * @{
    3131 */
     
    3737#ifndef ETHIP_H_
    3838#define ETHIP_H_
     39
     40#include <adt/list.h>
     41#include <async.h>
     42#include <inet/iplink_srv.h>
     43#include <loc.h>
     44#include <sys/types.h>
    3945
    4046typedef struct ethip_nic {
     
    4854} ethip_nic_t;
    4955
     56/** IEEE MAC-48 identifier */
     57typedef struct {
     58        /** MAC Address (in lowest 48 bits) */
     59        uint64_t addr;
     60} mac48_addr_t;
     61
     62/** Ethernet frame */
     63typedef struct {
     64        /** Destination Address */
     65        mac48_addr_t dest;
     66        /** Source Address */
     67        mac48_addr_t src;
     68        /** Ethertype or Length */
     69        uint16_t etype_len;
     70        /** Payload */
     71        void *data;
     72        /** Payload size */
     73        size_t size;
     74} eth_frame_t;
     75
    5076extern int ethip_iplink_init(ethip_nic_t *);
     77extern int ethip_received(iplink_srv_t *, void *, size_t);
     78
    5179
    5280#endif
Note: See TracChangeset for help on using the changeset viewer.