Ignore:
File:
1 edited

Legend:

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

    ra26b9e3 rffaba00  
    4545
    4646/** ICMP header size in bytes. */
    47 #define ICMP_HEADER_SIZE        sizeof(icmp_header_t)
    48 
    49 /** Type definition of the echo specific data.
    50  * @see icmp_echo
    51  */
    52 typedef struct icmp_echo icmp_echo_t;
    53 
    54 /** Type definition of the echo specific data pointer.
    55  * @see icmp_echo
    56  */
    57 typedef icmp_echo_t *icmp_echo_ref;
     47#define ICMP_HEADER_SIZE  sizeof(icmp_header_t)
    5848
    5949/** Echo specific data. */
    60 struct icmp_echo {
     50typedef struct icmp_echo {
    6151        /** Message idintifier. */
    6252        icmp_param_t identifier;
    6353        /** Message sequence number. */
    6454        icmp_param_t sequence_number;
    65 } __attribute__ ((packed));
    66 
    67 /** Type definition of the internet control message header.
    68  * @see icmp_header
    69  */
    70 typedef struct icmp_header icmp_header_t;
    71 
    72 /** Type definition of the internet control message header pointer.
    73  * @see icmp_header
    74  */
    75 typedef icmp_header_t *icmp_header_ref;
     55} __attribute__((packed)) icmp_echo_t;
    7656
    7757/** Internet control message header. */
    78 struct icmp_header {
     58typedef struct icmp_header {
    7959        /** The type of the message. */
    8060        uint8_t type;
     
    9373         */
    9474        uint16_t checksum;
    95 
     75       
    9676        /** Message specific data. */
    9777        union {
    9878                /** Echo specific data. */
    99                 icmp_echo_t  echo;
     79                icmp_echo_t echo;
    10080                /** Proposed gateway value. */
    10181                in_addr_t gateway;
     
    11797                } param;
    11898        } un;
    119 } __attribute__ ((packed));
     99} __attribute__((packed)) icmp_header_t;
    120100
    121101#endif
Note: See TracChangeset for help on using the changeset viewer.