Changeset f2b3d3e in mainline for uspace/lib/c/include/inet/iplink.h
- Timestamp:
- 2012-05-04T10:57:48Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 35a35651
- Parents:
- 90924df (diff), d21e935c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/inet/iplink.h
r90924df rf2b3d3e 1 1 /* 2 * Copyright (c) 20 09 Lukas Mejdrech2 * Copyright (c) 2012 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup lib net29 /** @addtogroup libc 30 30 * @{ 31 31 */ 32 33 32 /** @file 34 * Internetwork layer module interface for the underlying network interface35 * layer. This interface is always called by the remote modules.36 33 */ 37 34 38 #ifndef LIB NET_IL_REMOTE_H_39 #define LIB NET_IL_REMOTE_H_35 #ifndef LIBC_INET_IPLINK_H_ 36 #define LIBC_INET_IPLINK_H_ 40 37 41 #include < ipc/services.h>38 #include <async.h> 42 39 #include <sys/types.h> 43 #include <net/device.h>44 #include <net/packet.h>45 #include <async.h>46 40 47 /** @name Internetwork layer module interface 48 * This interface is used by other modules. 49 */ 50 /*@{*/ 41 struct iplink_ev_ops; 51 42 52 extern int il_device_state_msg(async_sess_t *, nic_device_id_t, 53 nic_device_state_t, services_t); 54 extern int il_received_msg(async_sess_t *, nic_device_id_t, packet_t *, 55 services_t); 56 extern int il_mtu_changed_msg(async_sess_t *, nic_device_id_t, size_t, 57 services_t); 58 extern int il_addr_changed_msg(async_sess_t *, nic_device_id_t, size_t, 59 const uint8_t *); 43 typedef struct { 44 async_sess_t *sess; 45 struct iplink_ev_ops *ev_ops; 46 } iplink_t; 60 47 61 /*@}*/ 48 typedef struct { 49 uint32_t ipv4; 50 } iplink_addr_t; 51 52 /** IP link Service Data Unit */ 53 typedef struct { 54 /** Local source address */ 55 iplink_addr_t lsrc; 56 /** Local destination address */ 57 iplink_addr_t ldest; 58 /** Serialized IP packet */ 59 void *data; 60 /** Size of @c data in bytes */ 61 size_t size; 62 } iplink_sdu_t; 63 64 typedef struct iplink_ev_ops { 65 int (*recv)(iplink_t *, iplink_sdu_t *); 66 } iplink_ev_ops_t; 67 68 extern int iplink_open(async_sess_t *, iplink_ev_ops_t *, iplink_t **); 69 extern void iplink_close(iplink_t *); 70 extern 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 *); 73 extern int iplink_get_mtu(iplink_t *, size_t *); 62 74 63 75 #endif
Note:
See TracChangeset
for help on using the changeset viewer.