Changeset 6843a9c in mainline for uspace/srv/net/inetsrv/icmp_std.h


Ignore:
Timestamp:
2012-06-29T13:02:14Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
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.
Message:

Merge mainline changes

Trivial conflicts.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/inetsrv/icmp_std.h

    rba72f2b r6843a9c  
    11/*
    2  * Copyright (c) 2009 Lukas Mejdrech
     2 * Copyright (c) 2012 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup libc
     29/** @addtogroup inet
    3030 * @{
    3131 */
    32 
    33 /** @file
    34  * ICMP module application interface.
     32/**
     33 * @file ICMP standard definitions
     34 *
    3535 */
    3636
    37 #ifndef LIBC_ICMP_API_H_
    38 #define LIBC_ICMP_API_H_
     37#ifndef ICMP_STD_H_
     38#define ICMP_STD_H_
    3939
    40 #include <net/socket_codes.h>
    41 #include <net/inet.h>
    4240#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>
    4941
    50 /** @name ICMP module application interface
    51  * This interface is used by other application modules.
    52  */
    53 /*@{*/
     42#define IP_PROTO_ICMP 1
    5443
    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
    5746
    58 /*@}*/
     47/** ICMP message type */
     48enum icmp_type {
     49        ICMP_ECHO_REPLY   = 0,
     50        ICMP_ECHO_REQUEST = 8
     51};
     52
     53/** ICMP Echo Request or Reply message header */
     54typedef 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;
    5966
    6067#endif
Note: See TracChangeset for help on using the changeset viewer.