Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/net/include/icmp_header.h

    rffaba00 r88a1bb9  
    4545
    4646/** ICMP header size in bytes. */
    47 #define ICMP_HEADER_SIZE  sizeof(icmp_header_t)
     47#define ICMP_HEADER_SIZE        sizeof(icmp_header_t)
     48
     49/** Type definition of the echo specific data.
     50 * @see icmp_echo
     51 */
     52typedef struct icmp_echo icmp_echo_t;
    4853
    4954/** Echo specific data. */
    50 typedef struct icmp_echo {
     55struct icmp_echo {
    5156        /** Message idintifier. */
    5257        icmp_param_t identifier;
    5358        /** Message sequence number. */
    5459        icmp_param_t sequence_number;
    55 } __attribute__((packed)) icmp_echo_t;
     60} __attribute__ ((packed));
     61
     62/** Type definition of the internet control message header.
     63 * @see icmp_header
     64 */
     65typedef struct icmp_header icmp_header_t;
    5666
    5767/** Internet control message header. */
    58 typedef struct icmp_header {
     68struct icmp_header {
    5969        /** The type of the message. */
    6070        uint8_t type;
     
    7383         */
    7484        uint16_t checksum;
    75        
     85
    7686        /** Message specific data. */
    7787        union {
    7888                /** Echo specific data. */
    79                 icmp_echo_t echo;
     89                icmp_echo_t  echo;
    8090                /** Proposed gateway value. */
    8191                in_addr_t gateway;
     
    97107                } param;
    98108        } un;
    99 } __attribute__((packed)) icmp_header_t;
     109} __attribute__ ((packed));
    100110
    101111#endif
Note: See TracChangeset for help on using the changeset viewer.