Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/inet/iplink.h

    r962f03b r02a09ed  
    3838#include <async.h>
    3939#include <sys/types.h>
     40#include <inet/addr.h>
    4041
    4142struct iplink_ev_ops;
     
    4647} iplink_t;
    4748
    48 typedef struct {
    49         uint32_t ipv4;
    50 } iplink_addr_t;
    51 
    52 /** IP link Service Data Unit */
     49/** Internet link Service Data Unit */
    5350typedef struct {
    5451        /** Local source address */
    55         iplink_addr_t lsrc;
     52        inet_addr_t src;
    5653        /** Local destination address */
    57         iplink_addr_t ldest;
     54        inet_addr_t dest;
    5855        /** Serialized IP packet */
    5956        void *data;
     
    6259} iplink_sdu_t;
    6360
     61/** Internet link receive Service Data Unit */
     62typedef struct {
     63        /** Serialized datagram */
     64        void *data;
     65        /** Size of @c data in bytes */
     66        size_t size;
     67} iplink_recv_sdu_t;
     68
    6469typedef struct iplink_ev_ops {
    65         int (*recv)(iplink_t *, iplink_sdu_t *);
     70        int (*recv)(iplink_t *, iplink_recv_sdu_t *, uint16_t);
    6671} iplink_ev_ops_t;
    6772
     
    6974extern void iplink_close(iplink_t *);
    7075extern int iplink_send(iplink_t *, iplink_sdu_t *);
    71 extern int iplink_addr_add(iplink_t *, iplink_addr_t *);
    72 extern int iplink_addr_remove(iplink_t *, iplink_addr_t *);
     76extern int iplink_addr_add(iplink_t *, inet_addr_t *);
     77extern int iplink_addr_remove(iplink_t *, inet_addr_t *);
    7378extern int iplink_get_mtu(iplink_t *, size_t *);
    7479
Note: See TracChangeset for help on using the changeset viewer.