Ignore:
Timestamp:
2010-03-07T22:51:38Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
60ab6c3
Parents:
b5cbff4 (diff), 31c80a5 (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 from lp:~lukasmejdrech/helenos/network.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/structures/packet/packet_header.h

    rb5cbff4 r71b00dcc  
    4343 *  @param[in] header The packet header.
    4444 */
    45 #define PACKET_DATA_LENGTH( header )            (( header )->data_end - ( header )->data_start )
     45#define PACKET_DATA_LENGTH(header)              ((header)->data_end - (header)->data_start)
    4646
    4747/** Returns the maximum packet address length.
    4848 *  @param[in] header The packet header.
    4949 */
    50 #define PACKET_MAX_ADDRESS_LENGTH( header )             (( header )->dest_addr - ( header )->src_addr )
     50#define PACKET_MAX_ADDRESS_LENGTH(header)               ((header)->dest_addr - (header)->src_addr)
    5151
    5252/** Returns the minimum packet suffix.
    5353 *  @param[in] header The packet header.
    5454 */
    55 #define PACKET_MIN_SUFFIX( header )             (( header )->length - ( header )->data_start - ( header )->max_content )
     55#define PACKET_MIN_SUFFIX(header)               ((header)->length - (header)->data_start - (header)->max_content)
    5656
    5757/** Packet integrity check magic value.
     
    6464        /** Packet identifier.
    6565         */
    66         packet_id_t             packet_id;
     66        packet_id_t packet_id;
    6767        /** Packet queue sorting value.
    6868         *  The packet queue is sorted the ascending order.
    6969         */
    70         size_t                  order;
     70        size_t order;
    7171        /** Packet metric.
    7272         */
    73         size_t                  metric;
     73        size_t metric;
    7474        /** Previous packet in the queue.
    7575         */
    76         packet_id_t             previous;
     76        packet_id_t previous;
    7777        /** Next packet in the queue.
    7878         */
    79         packet_id_t             next;
     79        packet_id_t next;
    8080        /** Total length of the packet.
    8181         *  Contains the header, the addresses and the data of the packet.
    8282         *  Corresponds to the mapped sharable memory block.
    8383         */
    84         size_t                  length;
     84        size_t length;
    8585        /** Stored source and destination addresses length.
    8686         */
    87         size_t                  addr_len;
     87        size_t addr_len;
    8888        /** Souce address offset in bytes from the beginning of the packet header.
    8989         */
    90         size_t                  src_addr;
     90        size_t src_addr;
    9191        /** Destination address offset in bytes from the beginning of the packet header.
    9292         */
    93         size_t                  dest_addr;
     93        size_t dest_addr;
    9494        /** Reserved data prefix length in bytes.
    9595         */
    96         size_t                  max_prefix;
     96        size_t max_prefix;
    9797        /** Reserved content length in bytes.
    9898         */
    99         size_t                  max_content;
     99        size_t max_content;
    100100        /** Actual data start offset in bytes from the beginning of the packet header.
    101101         */
    102         size_t                  data_start;
     102        size_t data_start;
    103103        /** Actual data end offset in bytes from the beginning of the packet header.
    104104         */
    105         size_t                  data_end;
     105        size_t data_end;
    106106        /** Integrity check magic value.
    107107         */
    108         int                             magic_value;
     108        int magic_value;
    109109};
    110110
     
    114114 *  @returns false otherwise.
    115115 */
    116 static inline int       packet_is_valid( const packet_t packet ){
    117         return packet && ( packet->magic_value == PACKET_MAGIC_VALUE );
     116static inline int packet_is_valid(const packet_t packet){
     117        return packet && (packet->magic_value == PACKET_MAGIC_VALUE);
    118118}
    119119
Note: See TracChangeset for help on using the changeset viewer.