Changeset 6843a9c in mainline for uspace/srv/net/inetsrv/icmp_std.h
- Timestamp:
- 2012-06-29T13:02:14Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 722912e
- Parents:
- ba72f2b (diff), 0bbd13e (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/srv/net/inetsrv/icmp_std.h
rba72f2b r6843a9c 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 libc29 /** @addtogroup inet 30 30 * @{ 31 31 */ 32 33 /** @file 34 * ICMP module application interface.32 /** 33 * @file ICMP standard definitions 34 * 35 35 */ 36 36 37 #ifndef LIBC_ICMP_API_H_38 #define LIBC_ICMP_API_H_37 #ifndef ICMP_STD_H_ 38 #define ICMP_STD_H_ 39 39 40 #include <net/socket_codes.h>41 #include <net/inet.h>42 40 #include <sys/types.h> 43 #include <sys/time.h>44 #include <adt/measured_strings.h>45 #include <net/ip_codes.h>46 #include <net/icmp_codes.h>47 #include <net/icmp_common.h>48 #include <async.h>49 41 50 /** @name ICMP module application interface 51 * This interface is used by other application modules. 52 */ 53 /*@{*/ 42 #define IP_PROTO_ICMP 1 54 43 55 extern int icmp_echo_msg(async_sess_t *, size_t, mseconds_t, ip_ttl_t, ip_tos_t, 56 int, const struct sockaddr *, socklen_t); 44 /** Type of service used for ICMP */ 45 #define ICMP_TOS 0 57 46 58 /*@}*/ 47 /** ICMP message type */ 48 enum icmp_type { 49 ICMP_ECHO_REPLY = 0, 50 ICMP_ECHO_REQUEST = 8 51 }; 52 53 /** ICMP Echo Request or Reply message header */ 54 typedef struct { 55 /** ICMP message type */ 56 uint8_t type; 57 /** Code (0) */ 58 uint8_t code; 59 /** Internet checksum of the ICMP message */ 60 uint16_t checksum; 61 /** Indentifier */ 62 uint16_t ident; 63 /** Sequence number */ 64 uint16_t seq_no; 65 } icmp_echo_t; 59 66 60 67 #endif
Note:
See TracChangeset
for help on using the changeset viewer.