Ignore:
File:
1 edited

Legend:

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

    rffaba00 ra26b9e3  
    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;
     53
     54/** Type definition of the echo specific data pointer.
     55 * @see icmp_echo
     56 */
     57typedef icmp_echo_t *icmp_echo_ref;
    4858
    4959/** Echo specific data. */
    50 typedef struct icmp_echo {
     60struct icmp_echo {
    5161        /** Message idintifier. */
    5262        icmp_param_t identifier;
    5363        /** Message sequence number. */
    5464        icmp_param_t sequence_number;
    55 } __attribute__((packed)) icmp_echo_t;
     65} __attribute__ ((packed));
     66
     67/** Type definition of the internet control message header.
     68 * @see icmp_header
     69 */
     70typedef struct icmp_header icmp_header_t;
     71
     72/** Type definition of the internet control message header pointer.
     73 * @see icmp_header
     74 */
     75typedef icmp_header_t *icmp_header_ref;
    5676
    5777/** Internet control message header. */
    58 typedef struct icmp_header {
     78struct icmp_header {
    5979        /** The type of the message. */
    6080        uint8_t type;
     
    7393         */
    7494        uint16_t checksum;
    75        
     95
    7696        /** Message specific data. */
    7797        union {
    7898                /** Echo specific data. */
    79                 icmp_echo_t echo;
     99                icmp_echo_t  echo;
    80100                /** Proposed gateway value. */
    81101                in_addr_t gateway;
     
    97117                } param;
    98118        } un;
    99 } __attribute__((packed)) icmp_header_t;
     119} __attribute__ ((packed));
    100120
    101121#endif
Note: See TracChangeset for help on using the changeset viewer.