Changeset aadf01e in mainline for uspace/srv/net/include


Ignore:
Timestamp:
2010-03-07T15:13:28Z (15 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)

Location:
uspace/srv/net/include
Files:
26 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/include/arp_interface.h

    raa85487 raadf01e  
    6767 *  @returns Other error codes as defined for the nil_get_broadcast_addr() function.
    6868 */
    69 int     arp_device_req( int arp_phone, device_id_t device_id, services_t protocol, services_t netif, measured_string_ref address );
     69int arp_device_req(int arp_phone, device_id_t device_id, services_t protocol, services_t netif, measured_string_ref address);
    7070
    7171/** Translates the given protocol address to the network interface address.
     
    8383 *  @returns ENOENT if the mapping is not found.
    8484 */
    85 int     arp_translate_req( int arp_phone, device_id_t device_id, services_t protocol, measured_string_ref address, measured_string_ref * translation, char ** data );
     85int arp_translate_req(int arp_phone, device_id_t device_id, services_t protocol, measured_string_ref address, measured_string_ref * translation, char ** data);
    8686
    8787/** Clears the device cache.
     
    9191 *  @returns ENOENT if the device is not found.
    9292 */
    93 int     arp_clear_device_req( int arp_phone, device_id_t device_id );
     93int arp_clear_device_req(int arp_phone, device_id_t device_id);
    9494
    9595/** Clears the given protocol address from the cache.
     
    101101 *  @returns ENOENT if the mapping is not found.
    102102 */
    103 int     arp_clear_address_req( int arp_phone, device_id_t device_id, services_t protocol, measured_string_ref address );
     103int arp_clear_address_req(int arp_phone, device_id_t device_id, services_t protocol, measured_string_ref address);
    104104
    105105/** Cleans the cache.
     
    107107 *  @returns EOK on success.
    108108 */
    109 int     arp_clean_cache_req( int arp_phone );
     109int arp_clean_cache_req(int arp_phone);
    110110
    111111/** Connects to the ARP module.
     
    114114 *  @returns 0 if called by the bundle module.
    115115 */
    116 int     arp_connect_module( services_t service );
     116int arp_connect_module(services_t service);
    117117
    118118/** Returns the ARP task identifier.
     
    120120 *  @returns 0 if called by the remote module.
    121121 */
    122 task_id_t       arp_task_get_id( void );
     122task_id_t arp_task_get_id(void);
    123123
    124124/*@}*/
  • uspace/srv/net/include/byteorder.h

    raa85487 raadf01e  
    4242
    4343
    44 /** Converts the given short number ( 16 bit ) from the host byte order to the network byte order ( big endian ).
     44/** Converts the given short number (16 bit) from the host byte order to the network byte order (big endian).
    4545 *  @param[in] number The number in the host byte order to be converted.
    4646 *  @returns The number in the network byte order.
    4747 */
    48 #define htons( number )         host2uint16_t_be( number )
     48#define htons(number)           host2uint16_t_be(number)
    4949
    50 /** Converts the given long number ( 32 bit ) from the host byte order to the network byte order ( big endian ).
     50/** Converts the given long number (32 bit) from the host byte order to the network byte order (big endian).
    5151 *  @param[in] number The number in the host byte order to be converted.
    5252 *  @returns The number in the network byte order.
    5353 */
    54 #define htonl( number )         host2uint32_t_be( number )
     54#define htonl(number)           host2uint32_t_be(number)
    5555
    56 /** Converts the given short number ( 16 bit ) from the network byte order ( big endian ) to the host byte order.
     56/** Converts the given short number (16 bit) from the network byte order (big endian) to the host byte order.
    5757 *  @param[in] number The number in the network byte order to be converted.
    5858 *  @returns The number in the host byte order.
    5959 */
    60 #define ntohs( number )         uint16_t_be2host( number )
     60#define ntohs(number)   uint16_t_be2host(number)
    6161
    62 /** Converts the given long number ( 32 bit ) from the network byte order ( big endian ) to the host byte order.
     62/** Converts the given long number (32 bit) from the network byte order (big endian) to the host byte order.
    6363 *  @param[in] number The number in the network byte order to be converted.
    6464 *  @returns The number in the host byte order.
    6565 */
    66 #define ntohl( number )         uint32_t_be2host( number )
     66#define ntohl(number)           uint32_t_be2host(number)
    6767
    6868#endif
  • uspace/srv/net/include/checksum.h

    raa85487 raadf01e  
    5454 */
    5555#ifdef ARCH_IS_BIG_ENDIAN
    56         #define compute_crc32( seed, data, length )     compute_crc32_be( seed, ( uint8_t * ) data, length )
     56        #define compute_crc32(seed, data, length)       compute_crc32_be(seed, (uint8_t *) data, length)
    5757#else
    58         #define compute_crc32( seed, data, length )     compute_crc32_le( seed, ( uint8_t * ) data, length )
     58        #define compute_crc32(seed, data, length)       compute_crc32_le(seed, (uint8_t *) data, length)
    5959#endif
    6060
     
    6565 *  @returns The computed CRC32 of the length bits of the data.
    6666 */
    67 uint32_t        compute_crc32_le( uint32_t seed, uint8_t * data, size_t length );
     67uint32_t compute_crc32_le(uint32_t seed, uint8_t * data, size_t length);
    6868
    6969/**     Computes CRC32 value in the big-endian environment.
     
    7373 *  @returns The computed CRC32 of the length bits of the data.
    7474 */
    75 uint32_t        compute_crc32_be( uint32_t seed, uint8_t * data, size_t length );
     75uint32_t compute_crc32_be(uint32_t seed, uint8_t * data, size_t length);
    7676
    7777/** Computes sum of the 2 byte fields.
     
    8282 *  @returns The computed checksum of the length bytes of the data.
    8383 */
    84 uint32_t        compute_checksum( uint32_t seed, uint8_t * data, size_t length );
     84uint32_t compute_checksum(uint32_t seed, uint8_t * data, size_t length);
    8585
    8686/** Compacts the computed checksum to the 16 bit number adding the carries.
     
    8888 *  @returns Compacted computed checksum to the 16 bits.
    8989 */
    90 uint16_t        compact_checksum( uint32_t sum );
     90uint16_t compact_checksum(uint32_t sum);
    9191
    9292/** Returns or flips the checksum if zero.
     
    9595 *  @returns 0xFFFF if the computed checksum is zero.
    9696 */
    97 uint16_t        flip_checksum( uint16_t checksum );
     97uint16_t flip_checksum(uint16_t checksum);
    9898
    9999/** Computes the ip header checksum.
     
    106106 *  @returns 0xFFFF if the computed checksum is zero.
    107107 */
    108 uint16_t ip_checksum( uint8_t * data, size_t length );
     108uint16_t ip_checksum(uint8_t * data, size_t length);
    109109
    110110#endif
  • uspace/srv/net/include/device.h

    raa85487 raadf01e  
    5050/** Invalid device identifier.
    5151 */
    52 #define DEVICE_INVALID_ID               ( -1 )
     52#define DEVICE_INVALID_ID               (-1)
    5353
    5454/** Device identifier type.
     
    9292        /** Total packets received.
    9393         */
    94         unsigned long   receive_packets;
     94        unsigned long receive_packets;
    9595        /** Total packets transmitted.
    9696         */
    97         unsigned long   send_packets;
     97        unsigned long send_packets;
    9898        /** Total bytes received.
    9999         */
    100         unsigned long   receive_bytes;
     100        unsigned long receive_bytes;
    101101        /** Total bytes transmitted.
    102102         */
    103         unsigned long   send_bytes;
     103        unsigned long send_bytes;
    104104        /** Bad packets received counter.
    105105         */
    106         unsigned long   receive_errors;
     106        unsigned long receive_errors;
    107107        /** Packet transmition problems counter.
    108108         */
    109         unsigned long   send_errors;
     109        unsigned long send_errors;
    110110        /** No space in buffers counter.
    111111         */
    112         unsigned long   receive_dropped;
     112        unsigned long receive_dropped;
    113113        /** No space available counter.
    114114         */
    115         unsigned long   send_dropped;
     115        unsigned long send_dropped;
    116116        /** Total multicast packets received.
    117117         */
    118         unsigned long   multicast;
     118        unsigned long multicast;
    119119        /** The number of collisions due to congestion on the medium.
    120120         */
    121         unsigned long   collisions;
     121        unsigned long collisions;
    122122
    123123        /* detailed receive_errors: */
    124124        /** Received packet length error counter.
    125125         */
    126         unsigned long   receive_length_errors;
     126        unsigned long receive_length_errors;
    127127        /** Receiver buffer overflow counter.
    128128         */
    129         unsigned long   receive_over_errors;
     129        unsigned long receive_over_errors;
    130130        /** Received packet with crc error counter.
    131131         */
    132         unsigned long   receive_crc_errors;
     132        unsigned long receive_crc_errors;
    133133        /** Received frame alignment error counter.
    134134         */
    135         unsigned long   receive_frame_errors;
     135        unsigned long receive_frame_errors;
    136136        /** Receiver fifo overrun counter.
    137137         */
    138         unsigned long   receive_fifo_errors;
     138        unsigned long receive_fifo_errors;
    139139        /** Receiver missed packet counter.
    140140         */
    141         unsigned long   receive_missed_errors;
     141        unsigned long receive_missed_errors;
    142142
    143143        /* detailed send_errors */
    144144        /** Transmitter aborted counter.
    145145         */
    146         unsigned long   send_aborted_errors;
     146        unsigned long send_aborted_errors;
    147147        /** Transmitter carrier errors counter.
    148148         */
    149         unsigned long   send_carrier_errors;
     149        unsigned long send_carrier_errors;
    150150        /** Transmitter fifo overrun counter.
    151151         */
    152         unsigned long   send_fifo_errors;
     152        unsigned long send_fifo_errors;
    153153        /** Transmitter carrier errors counter.
    154154         */
    155         unsigned long   send_heartbeat_errors;
     155        unsigned long send_heartbeat_errors;
    156156        /** Transmitter window errors counter.
    157157         */
    158         unsigned long   send_window_errors;
     158        unsigned long send_window_errors;
    159159
    160160        /* for cslip etc */
    161161        /** Total compressed packets received.
    162162         */
    163         unsigned long   receive_compressed;
     163        unsigned long receive_compressed;
    164164        /** Total compressed packet transmitted.
    165165         */
    166         unsigned long   send_compressed;
     166        unsigned long send_compressed;
    167167};
    168168
  • uspace/srv/net/include/ethernet_lsap.h

    raa85487 raadf01e  
    7272 */
    7373#define ETH_LSAP_SNA2   0x0C
    74 /** PROWAY (IEC955) Network Management & Initialization LSAP identifier.
     74/** PROWAY (IEC955) Network Management &Initialization LSAP identifier.
    7575 */
    7676#define ETH_LSAP_PROWAY_NMI     0x0E
  • uspace/srv/net/include/ethernet_protocols.h

    raa85487 raadf01e  
    373373#define ETH_P_Stanford_V_Kernel_prod            0x805C
    374374
    375 /** Evans & Sutherland ethernet protocol type.
     375/** Evans &Sutherland ethernet protocol type.
    376376 */
    377377#define ETH_P_Evans_Sutherland          0x805D
     
    873873#define ETH_P_Taurus_Controls_MAX               0x82AB
    874874
    875 /** Walker Richer & Quinn ethernet protocol type.
     875/** Walker Richer &Quinn ethernet protocol type.
    876876 */
    877877#define ETH_P_Walker_Richer_Quinn_MIN           0x82AC
    878878
    879 /** Walker Richer & Quinn ethernet protocol type.
     879/** Walker Richer &Quinn ethernet protocol type.
    880880 */
    881881#define ETH_P_Walker_Richer_Quinn_MAX           0x8693
     
    921921#define ETH_P_ATOMIC            0x86DF
    922922
    923 /** Landis & Gyr Powers ethernet protocol type.
     923/** Landis &Gyr Powers ethernet protocol type.
    924924 */
    925925#define ETH_P_Landis_Gyr_Powers_MIN             0x86E0
    926926
    927 /** Landis & Gyr Powers ethernet protocol type.
     927/** Landis &Gyr Powers ethernet protocol type.
    928928 */
    929929#define ETH_P_Landis_Gyr_Powers_MAX             0x86EF
  • uspace/srv/net/include/icmp_api.h

    raa85487 raadf01e  
    7979 *  @returns EPARTY if there was an internal error.
    8080 */
    81 int     icmp_echo_msg( int icmp_phone, size_t size, mseconds_t timeout, ip_ttl_t ttl, ip_tos_t tos, int dont_fragment, const struct sockaddr * addr, socklen_t addrlen );
     81int icmp_echo_msg(int icmp_phone, size_t size, mseconds_t timeout, ip_ttl_t ttl, ip_tos_t tos, int dont_fragment, const struct sockaddr * addr, socklen_t addrlen);
    8282
    8383/*@}*/
  • uspace/srv/net/include/icmp_client.h

    raa85487 raadf01e  
    5050 *  @returns Zero (0) if the packet contains no data.
    5151 */
    52 int     icmp_client_process_packet( packet_t packet, icmp_type_t * type, icmp_code_t * code, icmp_param_t * pointer, icmp_param_t * mtu );
     52int icmp_client_process_packet(packet_t packet, icmp_type_t * type, icmp_code_t * code, icmp_param_t * pointer, icmp_param_t * mtu);
    5353
    5454/** Returns the ICMP header length.
     
    5656 *  @returns The ICMP header length in bytes.
    5757 */
    58 size_t  icmp_client_header_length( packet_t packet );
     58size_t icmp_client_header_length(packet_t packet);
    5959
    6060#endif
  • uspace/srv/net/include/icmp_common.h

    raa85487 raadf01e  
    4444/** Default timeout for incoming connections in microseconds.
    4545 */
    46 #define ICMP_CONNECT_TIMEOUT    ( 1 * 1000 * 1000 )
     46#define ICMP_CONNECT_TIMEOUT    (1 * 1000 * 1000)
    4747
    4848/** Connects to the ICMP module.
     
    5353 *  @returns ETIMEOUT if the connection timeouted.
    5454 */
    55 int     icmp_connect_module( services_t service, suseconds_t timeout );
     55int icmp_connect_module(services_t service, suseconds_t timeout);
    5656
    5757#endif
  • uspace/srv/net/include/icmp_interface.h

    raa85487 raadf01e  
    7171 *  @returns ENOMEM if there is not enough memory left.
    7272 */
    73 int icmp_destination_unreachable_msg( int icmp_phone, icmp_code_t code, icmp_param_t mtu, packet_t packet );
     73int icmp_destination_unreachable_msg(int icmp_phone, icmp_code_t code, icmp_param_t mtu, packet_t packet);
    7474
    7575/** Sends the Source Quench error notification packet.
     
    8282 *  @returns ENOMEM if there is not enough memory left.
    8383 */
    84 int icmp_source_quench_msg( int icmp_phone, packet_t packet );
     84int icmp_source_quench_msg(int icmp_phone, packet_t packet);
    8585
    8686/** Sends the Time Exceeded error notification packet.
     
    9494 *  @returns ENOMEM if there is not enough memory left.
    9595 */
    96 int icmp_time_exceeded_msg( int icmp_phone, icmp_code_t code, packet_t packet );
     96int icmp_time_exceeded_msg(int icmp_phone, icmp_code_t code, packet_t packet);
    9797
    9898/** Sends the Parameter Problem error notification packet.
     
    107107 *  @returns ENOMEM if there is not enough memory left.
    108108 */
    109 int icmp_parameter_problem_msg( int icmp_phone, icmp_code_t code, icmp_param_t pointer, packet_t packet );
     109int icmp_parameter_problem_msg(int icmp_phone, icmp_code_t code, icmp_param_t pointer, packet_t packet);
    110110
    111111/*@}*/
  • uspace/srv/net/include/il_interface.h

    raa85487 raadf01e  
    6464 *  @returns EOK on success.
    6565 */
    66 static inline int       il_device_state_msg( int il_phone, device_id_t device_id, device_state_t state, services_t target ){
    67         return generic_device_state_msg( il_phone, NET_IL_DEVICE_STATE, device_id, state, target );
     66static inline int il_device_state_msg(int il_phone, device_id_t device_id, device_state_t state, services_t target){
     67        return generic_device_state_msg(il_phone, NET_IL_DEVICE_STATE, device_id, state, target);
    6868}
    6969
     
    7575 *  @returns EOK on success.
    7676 */
    77 inline static int       il_received_msg( int il_phone, device_id_t device_id, packet_t packet, services_t target ){
    78         return generic_received_msg( il_phone, NET_IL_RECEIVED, device_id, packet_get_id( packet ), target, 0 );
     77inline static int il_received_msg(int il_phone, device_id_t device_id, packet_t packet, services_t target){
     78        return generic_received_msg(il_phone, NET_IL_RECEIVED, device_id, packet_get_id(packet), target, 0);
    7979}
    8080
     
    8686 *  @returns EOK on success.
    8787 */
    88 inline static int       il_mtu_changed_msg( int il_phone, device_id_t device_id, size_t mtu, services_t target ){
    89         return generic_device_state_msg( il_phone, NET_IL_MTU_CHANGED, device_id, ( int ) mtu, target );
     88inline static int il_mtu_changed_msg(int il_phone, device_id_t device_id, size_t mtu, services_t target){
     89        return generic_device_state_msg(il_phone, NET_IL_MTU_CHANGED, device_id, (int) mtu, target);
    9090}
    9191
  • uspace/srv/net/include/in.h

    raa85487 raadf01e  
    4545/** INET string address maximum length.
    4646 */
    47 #define INET_ADDRSTRLEN         ( 4 * 3 + 3 + 1 )
     47#define INET_ADDRSTRLEN         (4 * 3 + 3 + 1)
    4848
    4949/** Type definition of the INET address.
     
    6262        /** 4 byte IP address.
    6363         */
    64         uint32_t                s_addr;
     64        uint32_t s_addr;
    6565};
    6666
     
    7272         *  Should be AF_INET.
    7373         */
    74         uint16_t                sin_family;
     74        uint16_t sin_family;
    7575        /** Port number.
    7676         */
    77         uint16_t                sin_port;
     77        uint16_t sin_port;
    7878        /** Internet address.
    7979         */
    80         struct in_addr  sin_addr;
     80        struct in_addr sin_addr;
    8181        /** Padding to meet the sockaddr size.
    8282         */
    83         uint8_t                 sin_zero[ 8 ];
     83        uint8_t sin_zero[8];
    8484};
    8585
  • uspace/srv/net/include/in6.h

    raa85487 raadf01e  
    4545/** INET6 string address maximum length.
    4646 */
    47 #define INET6_ADDRSTRLEN        ( 8 * 4 + 7 + 1 )
     47#define INET6_ADDRSTRLEN        (8 * 4 + 7 + 1)
    4848
    4949/** Type definition of the INET6 address.
     
    6262        /** 16 byte IPv6 address.
    6363         */
    64         unsigned char   s6_addr[ 16 ];
     64        unsigned char s6_addr[16];
    6565};
    6666
     
    7272         *  Should be AF_INET6.
    7373         */
    74         uint16_t                sin6_family;
     74        uint16_t sin6_family;
    7575        /** Port number.
    7676         */
    77         uint16_t                sin6_port;
     77        uint16_t sin6_port;
    7878        /** IPv6 flow information.
    7979         */
    80         uint32_t                sin6_flowinfo;
     80        uint32_t sin6_flowinfo;
    8181        /** IPv6 address.
    8282         */
    83         struct in6_addr sin6_addr;
     83        struct in6_addr sin6_addr;
    8484        /** Scope identifier.
    8585         */
    86         uint32_t                sin6_scope_id;
     86        uint32_t sin6_scope_id;
    8787};
    8888
  • uspace/srv/net/include/inet.h

    raa85487 raadf01e  
    6262 *  @returns ENOTSUP if the address family is not supported.
    6363 */
    64 int     inet_ntop( uint16_t family, const uint8_t * data, char * address, size_t length );
     64int inet_ntop(uint16_t family, const uint8_t * data, char * address, size_t length);
    6565
    6666/** Parses the character string into the address.
     
    7474 *  @returns ENOTSUP if the address family is not supported.
    7575 */
    76 int     inet_pton( uint16_t family, const char * address, uint8_t * data );
     76int inet_pton(uint16_t family, const char * address, uint8_t * data);
    7777
    7878/** Socket address.
     
    8282         *  @see socket.h
    8383         */
    84         uint16_t                sa_family;
     84        uint16_t sa_family;
    8585        /** 14 byte protocol address.
    8686         */
    87         uint8_t                 sa_data[ 14 ];
     87        uint8_t sa_data[14];
    8888};
    8989
  • uspace/srv/net/include/ip_client.h

    raa85487 raadf01e  
    5757 *  @returns ENOMEM if there is not enough memory left in the packet.
    5858 */
    59 int     ip_client_prepare_packet( packet_t packet, ip_protocol_t protocol, ip_ttl_t ttl, ip_tos_t tos, int dont_fragment, size_t ipopt_length );
     59int ip_client_prepare_packet(packet_t packet, ip_protocol_t protocol, ip_ttl_t ttl, ip_tos_t tos, int dont_fragment, size_t ipopt_length);
    6060
    6161/** Processes the received IP packet.
     
    7171 *  @returns ENOMEM if the packet is too short to contain the IP header.
    7272 */
    73 int     ip_client_process_packet( packet_t packet, ip_protocol_t * protocol, ip_ttl_t * ttl, ip_tos_t * tos, int * dont_fragment, size_t * ipopt_length );
     73int ip_client_process_packet(packet_t packet, ip_protocol_t * protocol, ip_ttl_t * ttl, ip_tos_t * tos, int * dont_fragment, size_t * ipopt_length);
    7474
    7575/** Returns the IP header length.
     
    7878 *  @returns Zero (0) if there is no IP header.
    7979 */
    80 size_t  ip_client_header_length( packet_t packet );
     80size_t ip_client_header_length(packet_t packet);
    8181
    8282/** Updates the IPv4 pseudo header data length field.
     
    8888 *  @returns EINVAL if the headerlen parameter is not IPv4 pseudo header length.
    8989 */
    90 int     ip_client_set_pseudo_header_data_length( ip_pseudo_header_ref header, size_t headerlen, size_t data_length );
     90int ip_client_set_pseudo_header_data_length(ip_pseudo_header_ref header, size_t headerlen, size_t data_length);
    9191
    9292/** Constructs the IPv4 pseudo header.
     
    108108 *  @returns ENOMEM if there is not enough memory left.
    109109 */
    110 int     ip_client_get_pseudo_header( ip_protocol_t protocol, struct sockaddr * src, socklen_t srclen, struct sockaddr * dest, socklen_t destlen, size_t data_length, ip_pseudo_header_ref * header, size_t * headerlen );
     110int ip_client_get_pseudo_header(ip_protocol_t protocol, struct sockaddr * src, socklen_t srclen, struct sockaddr * dest, socklen_t destlen, size_t data_length, ip_pseudo_header_ref * header, size_t * headerlen);
    111111
    112112// TODO ipopt manipulation
  • uspace/srv/net/include/ip_codes.h

    raa85487 raadf01e  
    9494/** Normal delay.
    9595 */
    96 #define IPTOS_NORMALDELAY                       ( 0x0 << IPTOS_DELAY_SHIFT )
     96#define IPTOS_NORMALDELAY                       (0x0 << IPTOS_DELAY_SHIFT)
    9797
    9898/** Low delay.
    9999 */
    100 #define IPTOS_LOWDELAY                          ( 0x1 << IPTOS_DELAY_SHIFT )
     100#define IPTOS_LOWDELAY                          (0x1 << IPTOS_DELAY_SHIFT)
    101101
    102102/** Normal throughput.
    103103 */
    104 #define IPTOS_NORMALTHROUGHPUT          ( 0x0 << IPTOS_THROUGHPUT_SHIFT )
     104#define IPTOS_NORMALTHROUGHPUT          (0x0 << IPTOS_THROUGHPUT_SHIFT)
    105105
    106106/** Throughput.
    107107 */
    108 #define IPTOS_THROUGHPUT                        ( 0x1 << IPTOS_THROUGHPUT_SHIFT )
     108#define IPTOS_THROUGHPUT                        (0x1 << IPTOS_THROUGHPUT_SHIFT)
    109109
    110110/** Normal reliability.
    111111 */
    112 #define IPTOS_NORMALRELIABILITY         ( 0x0 << IPTOS_RELIABILITY_SHIFT )
     112#define IPTOS_NORMALRELIABILITY         (0x0 << IPTOS_RELIABILITY_SHIFT)
    113113
    114114/** Reliability.
    115115 */
    116 #define IPTOS_RELIABILITY                       ( 0x1 << IPTOS_RELIABILITY_SHIFT )
     116#define IPTOS_RELIABILITY                       (0x1 << IPTOS_RELIABILITY_SHIFT)
    117117
    118118/** Normal cost.
    119119 */
    120 #define IPTOS_NORMALCOST                        ( 0x0 << IPTOS_COST_SHIFT )
     120#define IPTOS_NORMALCOST                        (0x0 << IPTOS_COST_SHIFT)
    121121
    122122/** Minimum cost.
    123123 */
    124 #define IPTOS_MICNCOST                          ( 0x1 << IPTOS_COST_SHIFT )
     124#define IPTOS_MICNCOST                          (0x1 << IPTOS_COST_SHIFT)
    125125
    126126/*@}*/
     
    137137/** Routine precedence.
    138138 */
    139 #define IPTOS_PREC_ROUTINE                      ( 0x0 << IPTOS_PRECEDENCE_SHIFT )
     139#define IPTOS_PREC_ROUTINE                      (0x0 << IPTOS_PRECEDENCE_SHIFT)
    140140
    141141/** Priority precedence.
    142142 */
    143 #define IPTOS_PREC_PRIORITY                     ( 0x1 << IPTOS_PRECEDENCE_SHIFT )
     143#define IPTOS_PREC_PRIORITY                     (0x1 << IPTOS_PRECEDENCE_SHIFT)
    144144
    145145/** Immediate precedence.
    146146 */
    147 #define IPTOS_PREC_IMMEDIATE            ( 0x2 << IPTOS_PRECEDENCE_SHIFT )
     147#define IPTOS_PREC_IMMEDIATE            (0x2 << IPTOS_PRECEDENCE_SHIFT)
    148148
    149149/** Flash precedence.
    150150 */
    151 #define IPTOS_PREC_FLASH                        ( 0x3 << IPTOS_PRECEDENCE_SHIFT )
     151#define IPTOS_PREC_FLASH                        (0x3 << IPTOS_PRECEDENCE_SHIFT)
    152152
    153153/** Flash override precedence.
    154154 */
    155 #define IPTOS_PREC_FLASHOVERRIDE        ( 0x4 << IPTOS_PRECEDENCE_SHIFT )
     155#define IPTOS_PREC_FLASHOVERRIDE        (0x4 << IPTOS_PRECEDENCE_SHIFT)
    156156
    157157/** Critical precedence.
    158158 */
    159 #define IPTOS_PREC_CRITIC_ECP           ( 0x5 << IPTOS_PRECEDENCE_SHIFT )
     159#define IPTOS_PREC_CRITIC_ECP           (0x5 << IPTOS_PRECEDENCE_SHIFT)
    160160
    161161/** Inter-network control precedence.
    162162 */
    163 #define IPTOS_PREC_INTERNETCONTROL      ( 0x6 << IPTOS_PRECEDENCE_SHIFT )
     163#define IPTOS_PREC_INTERNETCONTROL      (0x6 << IPTOS_PRECEDENCE_SHIFT)
    164164
    165165/** Network control precedence.
    166166 */
    167 #define IPTOS_PREC_NETCONTROL           ( 0x7 << IPTOS_PRECEDENCE_SHIFT )
     167#define IPTOS_PREC_NETCONTROL           (0x7 << IPTOS_PRECEDENCE_SHIFT)
    168168
    169169/*@}*/
     
    195195/** Copy flag.
    196196 */
    197 #define IPOPT_COPY                                      ( 1 << IPOPT_COPY_SHIFT )
     197#define IPOPT_COPY                                      (1 << IPOPT_COPY_SHIFT)
    198198
    199199/** Returns IP option type.
     
    202202 *  @param[in] number The IP option number.
    203203 */
    204 #define IPOPT_TYPE( copy, class, number )       ((( copy ) & IPOPT_COPY ) | (( class ) & IPOPT_CLASS_MASK ) | (( number << IPOPT_NUMBER_SHIFT ) & IPOPT_NUMBER_MASK ))
     204#define IPOPT_TYPE(copy, class, number) (((copy) &IPOPT_COPY) | ((class) &IPOPT_CLASS_MASK) | ((number << IPOPT_NUMBER_SHIFT) &IPOPT_NUMBER_MASK))
    205205
    206206/** Returns a value indicating whether the IP option should be copied.
    207207 *  @param[in] o The IP option.
    208208 */
    209 #define IPOPT_COPIED( o )                       (( o ) & IPOPT_COPY )
     209#define IPOPT_COPIED(o)                 ((o) &IPOPT_COPY)
    210210
    211211/** Returns an IP option class.
    212212 *  @param[in] o The IP option.
    213213 */
    214 #define IPOPT_CLASS( o )                        (( o ) & IPOPT_CLASS_MASK )
     214#define IPOPT_CLASS(o)                  ((o) &IPOPT_CLASS_MASK)
    215215
    216216/** Returns an IP option number.
    217217 *  @param[in] o The IP option.
    218218 */
    219 #define IPOPT_NUMBER( o )                       (( o ) & IPOPT_NUMBER_MASK )
     219#define IPOPT_NUMBER(o)                 ((o) &IPOPT_NUMBER_MASK)
    220220
    221221/*@}*/
     
    227227/** Control class.
    228228 */
    229 #define IPOPT_CONTROL                           ( 0 << IPOPT_CLASS_SHIFT )
     229#define IPOPT_CONTROL                           (0 << IPOPT_CLASS_SHIFT)
    230230
    231231/** Reserved class 1.
    232232 */
    233 #define IPOPT_RESERVED1                         ( 1 << IPOPT_CLASS_SHIFT )
     233#define IPOPT_RESERVED1                         (1 << IPOPT_CLASS_SHIFT)
    234234
    235235/** Measurement class.
    236236 */
    237 #define IPOPT_MEASUREMENT                       ( 2 << IPOPT_CLASS_SHIFT )
     237#define IPOPT_MEASUREMENT                       (2 << IPOPT_CLASS_SHIFT)
    238238
    239239/** Reserved class 2.
    240240 */
    241 #define IPOPT_RESERVED2                         ( 3 << IPOPT_CLASS_SHIFT )
     241#define IPOPT_RESERVED2                         (3 << IPOPT_CLASS_SHIFT)
    242242
    243243/*@}*/
     
    250250 */
    251251//#define IPOPT_END_OF_LIST                     0x0
    252 #define IPOPT_END                                       IPOPT_TYPE( 0, IPOPT_CONTROL, 0 )
     252#define IPOPT_END                                       IPOPT_TYPE(0, IPOPT_CONTROL, 0)
    253253
    254254/** No operation.
    255255 */
    256256//#define IPOPT_NO_OPERATION            0x1
    257 #define IPOPT_NOOP                                      IPOPT_TYPE( 0, IPOPT_CONTROL, 1 )
     257#define IPOPT_NOOP                                      IPOPT_TYPE(0, IPOPT_CONTROL, 1)
    258258
    259259/** Security.
    260260 */
    261261//#define IPOPT_SECURITY                        0x82
    262 #define IPOPT_SEC                                       IPOPT_TYPE( IPOPT_COPY, IPOPT_CONTROL, 2 )
     262#define IPOPT_SEC                                       IPOPT_TYPE(IPOPT_COPY, IPOPT_CONTROL, 2)
    263263
    264264/** Loose source.
    265265 */
    266266//#define IPOPT_LOOSE_SOURCE            0x83
    267 #define IPOPT_LSRR                                      IPOPT_TYPE( IPOPT_COPY, IPOPT_CONTROL, 3 )
     267#define IPOPT_LSRR                                      IPOPT_TYPE(IPOPT_COPY, IPOPT_CONTROL, 3)
    268268
    269269/** Strict route.
    270270 */
    271271//#define IPOPT_STRICT_SOURCE           0x89
    272 #define IPOPT_SSRR                                      IPOPT_TYPE( IPOPT_COPY, IPOPT_CONTROL, 9 )
     272#define IPOPT_SSRR                                      IPOPT_TYPE(IPOPT_COPY, IPOPT_CONTROL, 9)
    273273
    274274/** Record route.
    275275 */
    276276//#define IPOPT_RECORD_ROUTE            0x07
    277 #define IPOPT_RR                                        IPOPT_TYPE( IPOPT_COPY, IPOPT_CONTROL, 7 )
     277#define IPOPT_RR                                        IPOPT_TYPE(IPOPT_COPY, IPOPT_CONTROL, 7)
    278278
    279279/** Stream identifier.
    280280 */
    281281//#define IPOPT_STREAM_IDENTIFIER       0x88
    282 #define IPOPT_SID                                       IPOPT_TYPE( IPOPT_COPY, IPOPT_CONTROL, 8 )
     282#define IPOPT_SID                                       IPOPT_TYPE(IPOPT_COPY, IPOPT_CONTROL, 8)
    283283
    284284/** Stream identifier length.
     
    289289 */
    290290//#define IPOPT_INTERNET_TIMESTAMP      0x44
    291 #define IPOPT_TIMESTAMP                         IPOPT_TYPE( IPOPT_COPY, IPOPT_MEASUREMENT, 4 )
     291#define IPOPT_TIMESTAMP                         IPOPT_TYPE(IPOPT_COPY, IPOPT_MEASUREMENT, 4)
    292292
    293293/** Commercial IP security option.
    294294 */
    295 #define IPOPT_CIPSO                                     IPOPT_TYPE( IPOPT_COPY, IPOPT_CONTROL, 5 )
     295#define IPOPT_CIPSO                                     IPOPT_TYPE(IPOPT_COPY, IPOPT_CONTROL, 5)
    296296
    297297/** No operation variant.
  • uspace/srv/net/include/ip_interface.h

    raa85487 raadf01e  
    7070 *  @returns EOK on success.
    7171 */
    72 typedef int     ( * tl_received_msg_t )( device_id_t device_id, packet_t packet, services_t receiver, services_t error );
     72typedef int     (*tl_received_msg_t)(device_id_t device_id, packet_t packet, services_t receiver, services_t error);
    7373
    7474/** Creates bidirectional connection with the ip module service and registers the message receiver.
     
    8282 *  @returns Other error codes as defined for the bind_service() function.
    8383 */
    84 int     ip_bind_service( services_t service, int protocol, services_t me, async_client_conn_t receiver, tl_received_msg_t tl_received_msg );
     84int ip_bind_service(services_t service, int protocol, services_t me, async_client_conn_t receiver, tl_received_msg_t tl_received_msg);
    8585
    8686/** Registers the new device.
     
    9898 *  @returns Other error codes as defined for the arp_device_req() function.
    9999 */
    100 int     ip_device_req( int ip_phone, device_id_t device_id, services_t netif );
     100int ip_device_req(int ip_phone, device_id_t device_id, services_t netif);
    101101
    102102/** Sends the packet queue.
     
    110110 *  @returns Other error codes as defined for the generic_send_msg() function.
    111111 */
    112 int     ip_send_msg( int ip_phone, device_id_t device_id, packet_t packet, services_t sender, services_t error );
     112int ip_send_msg(int ip_phone, device_id_t device_id, packet_t packet, services_t sender, services_t error);
    113113
    114114/** Connects to the IP module.
     
    117117 *  @returns 0 if called by the bundle module.
    118118 */
    119 int     ip_connect_module( services_t service );
     119int ip_connect_module(services_t service);
    120120
    121121/** Adds a route to the device routing table.
     
    127127 *  @param[in] gateway The target network gateway. Not used if zero.
    128128 */
    129 int     ip_add_route_req( int ip_phone, device_id_t device_id, in_addr_t address, in_addr_t netmask, in_addr_t gateway );
     129int ip_add_route_req(int ip_phone, device_id_t device_id, in_addr_t address, in_addr_t netmask, in_addr_t gateway);
    130130
    131131/** Sets the default gateway.
     
    135135 *  @param[in] gateway The default gateway.
    136136 */
    137 int     ip_set_gateway_req( int ip_phone, device_id_t device_id, in_addr_t gateway );
     137int ip_set_gateway_req(int ip_phone, device_id_t device_id, in_addr_t gateway);
    138138
    139139/** Returns the device packet dimension for sending.
     
    145145 *  @returns Other error codes as defined for the generic_packet_size_req() function.
    146146 */
    147 int     ip_packet_size_req( int ip_phone, device_id_t device_id, packet_dimension_ref packet_dimension );
     147int ip_packet_size_req(int ip_phone, device_id_t device_id, packet_dimension_ref packet_dimension);
    148148
    149149/** Notifies the IP module about the received error notification packet.
     
    155155 *  @returns EOK on success.
    156156 */
    157 int     ip_received_error_msg( int ip_phone, device_id_t device_id, packet_t packet, services_t target, services_t error );
     157int ip_received_error_msg(int ip_phone, device_id_t device_id, packet_t packet, services_t target, services_t error);
    158158
    159159/** Returns the device identifier and the IP pseudo header based on the destination address.
     
    166166 *  @param[out] headerlen The IP pseudo header length.
    167167 */
    168 int     ip_get_route_req( int ip_phone, ip_protocol_t protocol, const struct sockaddr * destination, socklen_t addrlen, device_id_t * device_id, ip_pseudo_header_ref * header, size_t * headerlen );
     168int ip_get_route_req(int ip_phone, ip_protocol_t protocol, const struct sockaddr * destination, socklen_t addrlen, device_id_t * device_id, ip_pseudo_header_ref * header, size_t * headerlen);
    169169
    170170/*@}*/
  • uspace/srv/net/include/ip_protocols.h

    raa85487 raadf01e  
    610610/** Maximum internet protocol number.
    611611 */
    612 #define IPPROTO_MAX             ( IPPROTO_RAW + 1 )
     612#define IPPROTO_MAX             (IPPROTO_RAW + 1)
    613613
    614614/*@}*/
  • uspace/srv/net/include/net_interface.h

    raa85487 raadf01e  
    6666 *  @returns Other error codes as defined for the generic_translate_req() function.
    6767 */
    68 int     net_get_device_conf_req( int net_phone, device_id_t device_id, measured_string_ref * configuration, size_t count, char ** data );
     68int net_get_device_conf_req(int net_phone, device_id_t device_id, measured_string_ref * configuration, size_t count, char ** data);
    6969
    7070/** Returns the global configuration.
     
    8080 *  @returns Other error codes as defined for the generic_translate_req() function.
    8181 */
    82 int     net_get_conf_req( int net_phone, measured_string_ref * configuration, size_t count, char ** data );
     82int net_get_conf_req(int net_phone, measured_string_ref * configuration, size_t count, char ** data);
    8383
    8484/** Frees the received settings.
     
    8888 *  @see net_get_conf_req()
    8989 */
    90 void    net_free_settings( measured_string_ref settings, char * data );
     90void net_free_settings(measured_string_ref settings, char * data);
    9191
    9292/** Connects to the networking module.
     
    9595 *  @returns 0 if called by the bundle module.
    9696 */
    97 int     net_connect_module( services_t service );
     97int net_connect_module(services_t service);
    9898
    9999/*@}*/
  • uspace/srv/net/include/netdb.h

    raa85487 raadf01e  
    4646        /** Official host name.
    4747         */
    48         char *  h_name;
     48        char * h_name;
    4949        /** Alias list.
    5050         */
     
    5252        /** Host address type.
    5353         */
    54         int             h_addrtype;
     54        int h_addrtype;
    5555        /** Address length.
    5656         */
    57         int             h_length;
     57        int h_length;
    5858        /** List of addresses from name server.
    5959         */
     
    6161        /** Address, for backward compatiblity.
    6262         */
    63 #define h_addr  h_addr_list[ 0 ]
     63#define h_addr  h_addr_list[0]
    6464};
    6565
     
    9696 *  @returns Host entry information.
    9797 */
    98 //struct hostent *      gethostbyaddr( const void * address, int len, int type );
     98//struct hostent *      gethostbyaddr(const void * address, int len, int type);
    9999
    100100/** Returns host entry by the host name.
     
    102102 *  @returns Host entry information.
    103103 */
    104 //struct hostent *      gethostbyname( const char * name );
     104//struct hostent *      gethostbyname(const char * name);
    105105
    106106#endif
  • uspace/srv/net/include/netif_interface.h

    raa85487 raadf01e  
    6565 *  @returns Other error codes as defined for the netif_get_addr_message() function.
    6666 */
    67 int     netif_get_addr_req( int netif_phone, device_id_t device_id, measured_string_ref * address, char ** data );
     67int netif_get_addr_req(int netif_phone, device_id_t device_id, measured_string_ref * address, char ** data);
    6868
    6969/** Probes the existence of the device.
     
    7575 *  @returns Other errro codes as defined for the netif_probe_message().
    7676 */
    77 int     netif_probe_req( int netif_phone, device_id_t device_id, int irq, int io );
     77int netif_probe_req(int netif_phone, device_id_t device_id, int irq, int io);
    7878
    7979/** Sends the packet queue.
     
    8585 *  @returns Other error codes as defined for the generic_send_msg() function.
    8686 */
    87 int     netif_send_msg( int netif_phone, device_id_t device_id, packet_t packet, services_t sender );
     87int netif_send_msg(int netif_phone, device_id_t device_id, packet_t packet, services_t sender);
    8888
    8989/** Starts the device.
     
    9494 *  @returns Other error codes as defined for the netif_start_message() function.
    9595 */
    96 int     netif_start_req( int netif_phone, device_id_t device_id );
     96int netif_start_req(int netif_phone, device_id_t device_id);
    9797
    9898/** Stops the device.
     
    103103 *  @returns Other error codes as defined for the netif_stop_message() function.
    104104 */
    105 int     netif_stop_req( int netif_phone, device_id_t device_id );
     105int netif_stop_req(int netif_phone, device_id_t device_id);
    106106
    107107/** Returns the device usage statistics.
     
    111111 *  @returns EOK on success.
    112112 */
    113 int     netif_stats_req( int netif_phone, device_id_t device_id, device_stats_ref stats );
     113int netif_stats_req(int netif_phone, device_id_t device_id, device_stats_ref stats);
    114114
    115115/** Creates bidirectional connection with the network interface module and registers the message receiver.
     
    122122 *  @returns Other error codes as defined for the bind_service() function.
    123123 */
    124 int     netif_bind_service( services_t service, device_id_t device_id, services_t me, async_client_conn_t receiver );
     124int netif_bind_service(services_t service, device_id_t device_id, services_t me, async_client_conn_t receiver);
    125125
    126126/*@}*/
  • uspace/srv/net/include/nil_interface.h

    raa85487 raadf01e  
    7171 *  @returns Other error codes as defined for the generic_get_addr_req() function.
    7272 */
    73 #define nil_get_addr_req( nil_phone, device_id, address, data ) \
    74         generic_get_addr_req( nil_phone, NET_NIL_ADDR, device_id, address, data )
     73#define nil_get_addr_req(nil_phone, device_id, address, data)   \
     74        generic_get_addr_req(nil_phone, NET_NIL_ADDR, device_id, address, data)
    7575
    7676/** Returns the device broadcast hardware address.
     
    8484 *  @returns Other error codes as defined for the generic_get_addr_req() function.
    8585 */
    86 #define nil_get_broadcast_addr_req( nil_phone, device_id, address, data )       \
    87         generic_get_addr_req( nil_phone, NET_NIL_BROADCAST_ADDR, device_id, address, data )
     86#define nil_get_broadcast_addr_req(nil_phone, device_id, address, data) \
     87        generic_get_addr_req(nil_phone, NET_NIL_BROADCAST_ADDR, device_id, address, data)
    8888
    8989/** Sends the packet queue.
     
    9595 *  @returns Other error codes as defined for the generic_send_msg() function.
    9696 */
    97 #define nil_send_msg( nil_phone, device_id, packet, sender )    \
    98         generic_send_msg( nil_phone, NET_NIL_SEND, device_id, packet_get_id( packet ), sender, 0 )
     97#define nil_send_msg(nil_phone, device_id, packet, sender)      \
     98        generic_send_msg(nil_phone, NET_NIL_SEND, device_id, packet_get_id(packet), sender, 0)
    9999
    100100/** Returns the device packet dimension for sending.
     
    106106 *  @returns Other error codes as defined for the generic_packet_size_req() function.
    107107 */
    108 #define nil_packet_size_req( nil_phone, device_id, packet_dimension )   \
    109         generic_packet_size_req( nil_phone, NET_NIL_PACKET_SPACE, device_id, packet_dimension )
     108#define nil_packet_size_req(nil_phone, device_id, packet_dimension)     \
     109        generic_packet_size_req(nil_phone, NET_NIL_PACKET_SPACE, device_id, packet_dimension)
    110110
    111111/** Registers new device or updates the MTU of an existing one.
     
    119119 *  @returns Other error codes as defined for the generic_device_req() function.
    120120 */
    121 #define nil_device_req( nil_phone, device_id, mtu, netif_service )      \
    122         generic_device_req( nil_phone, NET_NIL_DEVICE, device_id, mtu, netif_service )
     121#define nil_device_req(nil_phone, device_id, mtu, netif_service)        \
     122        generic_device_req(nil_phone, NET_NIL_DEVICE, device_id, mtu, netif_service)
    123123
    124124/** Notifies the network interface layer about the device state change.
     
    129129 *  @returns Other error codes as defined for each specific module device state function.
    130130 */
    131 int nil_device_state_msg( int nil_phone, device_id_t device_id, int state );
     131int nil_device_state_msg(int nil_phone, device_id_t device_id, int state);
    132132
    133133/** Passes the packet queue to the network interface layer.
     
    140140 *  @returns Other error codes as defined for each specific module received function.
    141141 */
    142 int nil_received_msg( int nil_phone, device_id_t device_id, packet_t packet, services_t target );
     142int nil_received_msg(int nil_phone, device_id_t device_id, packet_t packet, services_t target);
    143143
    144144/** Creates bidirectional connection with the network interface layer module and registers the message receiver.
     
    151151 *  @returns Other error codes as defined for the bind_service() function.
    152152 */
    153 #define nil_bind_service( service, device_id, me, receiver )    \
    154         bind_service( service, device_id, me, 0, receiver );
     153#define nil_bind_service(service, device_id, me, receiver)      \
     154        bind_service(service, device_id, me, 0, receiver);
    155155/*@}*/
    156156
  • uspace/srv/net/include/protocol_map.h

    raa85487 raadf01e  
    5050 *  @returns 0 if mapping is not found.
    5151 */
    52 static inline eth_type_t protocol_map( services_t nil, services_t il ){
    53         switch( nil ){
     52static inline eth_type_t protocol_map(services_t nil, services_t il){
     53        switch(nil){
    5454                case SERVICE_ETHERNET:
    5555                case SERVICE_DP8390:
    56                         switch( il ){
     56                        switch(il){
    5757                                case SERVICE_IP:
    5858                                        return ETH_P_IP;
     
    7373 *  @returns 0 if mapping is not found.
    7474 */
    75 static inline services_t protocol_unmap( services_t nil, int protocol ){
    76         switch( nil ){
     75static inline services_t protocol_unmap(services_t nil, int protocol){
     76        switch(nil){
    7777                case SERVICE_ETHERNET:
    7878                case SERVICE_DP8390:
    79                         switch( protocol ){
     79                        switch(protocol){
    8080                                case ETH_P_IP:
    8181                                        return SERVICE_IP;
     
    9595 *  @returns ETH_LSAP_NULL if mapping is not found.
    9696 */
    97 static inline eth_type_t lsap_map( eth_lsap_t lsap ){
    98         switch( lsap ){
     97static inline eth_type_t lsap_map(eth_lsap_t lsap){
     98        switch(lsap){
    9999                case ETH_LSAP_IP:
    100100                        return ETH_P_IP;
     
    111111 *  @returns 0 if mapping is not found.
    112112 */
    113 static inline eth_lsap_t lsap_unmap( eth_type_t ethertype ){
    114         switch( ethertype ){
     113static inline eth_lsap_t lsap_unmap(eth_type_t ethertype){
     114        switch(ethertype){
    115115                case ETH_P_IP:
    116116                        return ETH_LSAP_IP;
     
    127127 *  @returns 0 if mapping is not found.
    128128 */
    129 static inline hw_type_t hardware_map( services_t nil ){
    130         switch( nil ){
     129static inline hw_type_t hardware_map(services_t nil){
     130        switch(nil){
    131131                case SERVICE_ETHERNET:
    132132                case SERVICE_DP8390:
  • uspace/srv/net/include/socket.h

    raa85487 raadf01e  
    6565 *  @returns Other error codes as defined for the bind_service_timeout() function.
    6666 */
    67 int     socket( int domain, int type, int protocol );
     67int socket(int domain, int type, int protocol);
    6868
    6969/** Binds the socket to a port address.
     
    7777 *  @returns Other error codes as defined for the NET_SOCKET_BIND message.
    7878 */
    79 int     bind( int socket_id, const struct sockaddr * my_addr, socklen_t addrlen );
     79int bind(int socket_id, const struct sockaddr * my_addr, socklen_t addrlen);
    8080
    8181/** Sets the number of connections waiting to be accepted.
     
    8787 *  @returns Other error codes as defined for the NET_SOCKET_LISTEN message.
    8888 */
    89 int     listen( int socket_id, int backlog );
     89int listen(int socket_id, int backlog);
    9090
    9191/** Accepts waiting socket.
     
    100100 *  @returns Other error codes as defined for the NET_SOCKET_ACCEPT message.
    101101 */
    102 int     accept( int socket_id, struct sockaddr * cliaddr, socklen_t * addrlen );
     102int accept(int socket_id, struct sockaddr * cliaddr, socklen_t * addrlen);
    103103
    104104/** Connects socket to the remote server.
     
    112112 *  @returns Other error codes as defined for the NET_SOCKET_CONNECT message.
    113113 */
    114 int     connect( int socket_id, const struct sockaddr * serv_addr, socklen_t addrlen );
     114int connect(int socket_id, const struct sockaddr * serv_addr, socklen_t addrlen);
    115115
    116116/** Closes the socket.
     
    121121 *  @returns Other error codes as defined for the NET_SOCKET_CLOSE message.
    122122 */
    123 int     closesocket( int socket_id );
     123int closesocket(int socket_id);
    124124
    125125/** Sends data via the socket.
     
    134134 *  @returns Other error codes as defined for the NET_SOCKET_SEND message.
    135135 */
    136 int send( int socket_id, void * data, size_t datalength, int flags );
     136int send(int socket_id, void * data, size_t datalength, int flags);
    137137
    138138/** Sends data via the socket to the remote address.
     
    150150 *  @returns Other error codes as defined for the NET_SOCKET_SENDTO message.
    151151 */
    152 int sendto( int socket_id, const void * data, size_t datalength, int flags, const struct sockaddr * toaddr, socklen_t addrlen );
     152int sendto(int socket_id, const void * data, size_t datalength, int flags, const struct sockaddr * toaddr, socklen_t addrlen);
    153153
    154154/** Receives data via the socket.
     
    163163 *  @returns Other error codes as defined for the NET_SOCKET_RECV message.
    164164 */
    165 int recv( int socket_id, void * data, size_t datalength, int flags );
     165int recv(int socket_id, void * data, size_t datalength, int flags);
    166166
    167167/** Receives data via the socket.
     
    178178 *  @returns Other error codes as defined for the NET_SOCKET_RECVFROM message.
    179179 */
    180 int recvfrom( int socket_id, void * data, size_t datalength, int flags, struct sockaddr * fromaddr, socklen_t * addrlen );
     180int recvfrom(int socket_id, void * data, size_t datalength, int flags, struct sockaddr * fromaddr, socklen_t * addrlen);
    181181
    182182/** Gets socket option.
     
    192192 *  @returns Other error codes as defined for the NET_SOCKET_GETSOCKOPT message.
    193193 */
    194 int     getsockopt( int socket_id, int level, int optname, void * value, size_t * optlen );
     194int getsockopt(int socket_id, int level, int optname, void * value, size_t * optlen);
    195195
    196196/** Sets socket option.
     
    206206 *  @returns Other error codes as defined for the NET_SOCKET_SETSOCKOPT message.
    207207 */
    208 int     setsockopt( int socket_id, int level, int optname, const void * value, size_t optlen );
     208int setsockopt(int socket_id, int level, int optname, const void * value, size_t optlen);
    209209
    210210/*@}*/
  • uspace/srv/net/include/socket_codes.h

    raa85487 raadf01e  
    442442        /** Stream (connection oriented) socket.
    443443         */
    444         SOCK_STREAM     = 1,
     444        SOCK_STREAM = 1,
    445445        /** Datagram (connectionless oriented) socket.
    446446         */
    447         SOCK_DGRAM      = 2,
     447        SOCK_DGRAM = 2,
    448448        /** Raw socket.
    449449         */
    450         SOCK_RAW        = 3
     450        SOCK_RAW = 3
    451451} sock_type_t;
    452452
  • uspace/srv/net/include/tl_interface.h

    raa85487 raadf01e  
    6464 *  @returns EOK on success.
    6565 */
    66 inline static int       tl_received_msg( int tl_phone, device_id_t device_id, packet_t packet, services_t target, services_t error ){
    67         return generic_received_msg( tl_phone, NET_TL_RECEIVED, device_id, packet_get_id( packet ), target, error );
     66inline static int tl_received_msg(int tl_phone, device_id_t device_id, packet_t packet, services_t target, services_t error){
     67        return generic_received_msg(tl_phone, NET_TL_RECEIVED, device_id, packet_get_id(packet), target, error);
    6868}
    6969
Note: See TracChangeset for help on using the changeset viewer.