Changeset 0c37135 in mainline for uspace/lib/c/include/inet/iplink.h
- Timestamp:
- 2012-04-18T07:32:58Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5f67cd61
- Parents:
- 3d93289a (diff), 63920b0 (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
r3d93289a r0c37135 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 libnet 30 * @{ 29 /** @addtogroup libc 30 * @{ 31 */ 32 /** @file 31 33 */ 32 34 33 #ifndef LIB NET_ICMP_REMOTE_H_34 #define LIB NET_ICMP_REMOTE_H_35 #ifndef LIBC_INET_IPLINK_H_ 36 #define LIBC_INET_IPLINK_H_ 35 37 36 #include < net/socket_codes.h>38 #include <async.h> 37 39 #include <sys/types.h> 38 #include <net/device.h>39 #include <adt/measured_strings.h>40 #include <net/packet.h>41 #include <net/inet.h>42 #include <net/ip_codes.h>43 #include <net/icmp_codes.h>44 #include <net/icmp_common.h>45 #include <async.h>46 40 47 /** @name ICMP module interface 48 * This interface is used by other modules. 49 */ 50 /*@{*/ 41 struct iplink_ev_ops; 51 42 52 extern int icmp_destination_unreachable_msg(async_sess_t *, icmp_code_t, 53 icmp_param_t, packet_t *); 54 extern int icmp_source_quench_msg(async_sess_t *, packet_t *); 55 extern int icmp_time_exceeded_msg(async_sess_t *, icmp_code_t, packet_t *); 56 extern int icmp_parameter_problem_msg(async_sess_t *, icmp_code_t, icmp_param_t, 57 packet_t *); 43 typedef struct { 44 async_sess_t *sess; 45 struct iplink_ev_ops *ev_ops; 46 } iplink_t; 58 47 59 /*@}*/ 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 *); 60 74 61 75 #endif
Note:
See TracChangeset
for help on using the changeset viewer.