Ignore:
Timestamp:
2010-03-07T15:13:28Z (14 years ago)
Author:
Lukas Mejdrech <lukasmejdrech@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
936835e
Parents:
aa85487
Message:

Coding style (no functional change)

File:
1 edited

Legend:

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

    raa85487 raadf01e  
    5959 *  @returns NULL if there is not enough memory left.
    6060 */
    61 #define PACKET_PREFIX( packet, type )   ( type * ) packet_prefix(( packet ), sizeof( type ))
     61#define PACKET_PREFIX(packet, type)     (type *) packet_prefix((packet), sizeof(type))
    6262
    6363/** Allocates the specified type right after the actual packet content and returns its pointer.
     
    6969 *  @returns NULL if there is not enough memory left.
    7070 */
    71 #define PACKET_SUFFIX( packet, type )   ( type * ) packet_suffix(( packet ), sizeof( type ))
     71#define PACKET_SUFFIX(packet, type)     (type *) packet_suffix((packet), sizeof(type))
    7272
    7373/** Trims the actual packet content by the specified prefix and suffix types.
     
    8080 *  @returns ENOMEM if there is not enough memory left.
    8181 */
    82 #define PACKET_TRIM( packet, prefix, suffix )   packet_trim(( packet ), sizeof( prefix ), sizeof( suffix ))
     82#define PACKET_TRIM(packet, prefix, suffix)     packet_trim((packet), sizeof(prefix), sizeof(suffix))
    8383
    8484/** Allocates the specified space right before the actual packet content and returns its pointer.
     
    8888 *  @returns NULL if there is not enough memory left.
    8989 */
    90 void *  packet_prefix( packet_t packet, size_t length );
     90void * packet_prefix(packet_t packet, size_t length);
    9191
    9292/** Allocates the specified space right after the actual packet content and returns its pointer.
     
    9696 *  @returns NULL if there is not enough memory left.
    9797 */
    98 void *  packet_suffix( packet_t packet, size_t length );
     98void * packet_suffix(packet_t packet, size_t length);
    9999
    100100/** Trims the actual packet content by the specified prefix and suffix lengths.
     
    106106 *  @returns ENOMEM if there is not enough memory left.
    107107 */
    108 int     packet_trim( packet_t packet, size_t prefix, size_t suffix );
     108int packet_trim(packet_t packet, size_t prefix, size_t suffix);
    109109
    110110/** Copies the specified data to the beginning of the actual packet content.
     
    117117 *  @returns ENOMEM if there is not enough memory left.
    118118 */
    119 int     packet_copy_data( packet_t packet, const void * data, size_t length );
     119int packet_copy_data(packet_t packet, const void * data, size_t length);
    120120
    121121/** Returns the packet identifier.
     
    124124 *  @returns Zero (0) if the packet is not valid.
    125125 */
    126 packet_id_t packet_get_id( const packet_t packet );
     126packet_id_t packet_get_id(const packet_t packet);
    127127
    128128/** Returns the packet content length.
     
    131131 *  @returns Zero (0) if the packet is not valid.
    132132 */
    133 size_t  packet_get_data_length( const packet_t packet );
     133size_t packet_get_data_length(const packet_t packet);
    134134
    135135/** Returns the pointer to the beginning of the packet content.
     
    138138 *  @returns NULL if the packet is not valid.
    139139 */
    140 void *  packet_get_data( const packet_t packet );
     140void * packet_get_data(const packet_t packet);
    141141
    142142/** Returns the stored packet addresses and their length.
     
    148148 *  @returns EINVAL if the packet is not valid.
    149149 */
    150 int     packet_get_addr( const packet_t packet, uint8_t ** src, uint8_t ** dest );
     150int packet_get_addr(const packet_t packet, uint8_t ** src, uint8_t ** dest);
    151151
    152152/** Sets the packet addresses.
     
    159159 *  @returns ENOMEM if there is not enough memory left.
    160160 */
    161 int     packet_set_addr( packet_t packet, const uint8_t * src, const uint8_t * dest, size_t addr_len );
     161int packet_set_addr(packet_t packet, const uint8_t * src, const uint8_t * dest, size_t addr_len);
    162162
    163163/** Translates the packet identifier to the packet reference.
     
    172172 *  @returns Other error codes as defined for the packet_return() function.
    173173 */
    174 int packet_translate( int phone, packet_ref packet, packet_id_t packet_id );
     174int packet_translate(int phone, packet_ref packet, packet_id_t packet_id);
    175175
    176176/** Obtains the packet of the given dimensions.
     
    184184 *  @returns NULL on error.
    185185 */
    186 packet_t packet_get_4( int phone, size_t max_content, size_t addr_len, size_t max_prefix, size_t max_suffix );
     186packet_t packet_get_4(int phone, size_t max_content, size_t addr_len, size_t max_prefix, size_t max_suffix);
    187187
    188188/** Obtains the packet of the given content size.
     
    193193 *  @returns NULL on error.
    194194 */
    195 packet_t packet_get_1( int phone, size_t content );
     195packet_t packet_get_1(int phone, size_t content);
    196196
    197197/** Releases the packet queue.
     
    202202 *  @param[in] packet_id The packet identifier.
    203203 */
    204 void pq_release( int phone, packet_id_t packet_id );
     204void pq_release(int phone, packet_id_t packet_id);
    205205
    206206/** Returns the packet copy.
     
    212212 *  @returns NULL on error.
    213213 */
    214 packet_t        packet_get_copy( int phone, packet_t packet );
     214packet_t packet_get_copy(int phone, packet_t packet);
    215215
    216216/*@}*/
Note: See TracChangeset for help on using the changeset viewer.