Changeset 7715994 in mainline for uspace/srv/net/socket/socket_core.h


Ignore:
Timestamp:
2010-03-13T12:17:02Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6ba20a6b
Parents:
d0febca (diff), 2070570 (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 mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/socket/socket_core.h

    rd0febca r7715994  
    9393        /** Socket identifier.
    9494         */
    95         int                             socket_id;
     95        int socket_id;
    9696        /** Client application phone.
    9797         */
    98         int                             phone;
     98        int phone;
    9999        /** Bound port.
    100100         */
    101         int                             port;
     101        int port;
    102102        /** Received packets queue.
    103103         */
    104         dyn_fifo_t              received;
     104        dyn_fifo_t received;
    105105        /** Sockets for acceptance queue.
    106106         */
    107         dyn_fifo_t              accepted;
     107        dyn_fifo_t accepted;
    108108        /** Protocol specific data.
    109109         */
    110         void *                  specific_data;
     110        void * specific_data;
    111111        /** Socket ports map key.
    112112         */
    113         const char *    key;
     113        const char * key;
    114114        /** Length of the Socket ports map key.
    115115         */
    116         size_t                  key_length;
     116        size_t key_length;
    117117};
    118118
     
    120120 *  The key is the socket identifier.
    121121 */
    122 INT_MAP_DECLARE( socket_cores, socket_core_t );
     122INT_MAP_DECLARE(socket_cores, socket_core_t);
    123123
    124124/** Bount port sockets map.
    125125 *  The listening socket has the SOCKET_MAP_KEY_LISTENING key identifier whereas the other use the remote addresses.
    126126 */
    127 GENERIC_CHAR_MAP_DECLARE( socket_port_map, socket_core_ref );
     127GENERIC_CHAR_MAP_DECLARE(socket_port_map, socket_core_ref);
    128128
    129129/** Ports map.
    130130 *  The key is the port number.
    131131 */
    132 INT_MAP_DECLARE( socket_ports, socket_port_t );
     132INT_MAP_DECLARE(socket_ports, socket_port_t);
    133133
    134134/** Destroys local sockets.
     
    139139 *  @param[in] socket_release The client release callback function.
    140140 */
    141 void    socket_cores_release( int packet_phone, socket_cores_ref local_sockets, socket_ports_ref global_sockets, void ( * socket_release )( socket_core_ref socket ));
     141void socket_cores_release(int packet_phone, socket_cores_ref local_sockets, socket_ports_ref global_sockets, void (*socket_release)(socket_core_ref socket));
    142142
    143143/** Binds the socket to the port.
     
    158158 *  @returns Other error codes as defined for the socket_bind_insert() function.
    159159 */
    160 int socket_bind( socket_cores_ref local_sockets, socket_ports_ref global_sockets, int socket_id, void * addr, size_t addrlen, int free_ports_start, int free_ports_end, int last_used_port );
     160int socket_bind(socket_cores_ref local_sockets, socket_ports_ref global_sockets, int socket_id, void * addr, size_t addrlen, int free_ports_start, int free_ports_end, int last_used_port);
    161161
    162162/** Binds the socket to a free port.
     
    171171 *  @returns Other error codes as defined for the socket_bind_insert() function.
    172172 */
    173 int     socket_bind_free_port( socket_ports_ref global_sockets, socket_core_ref socket, int free_ports_start, int free_ports_end, int last_used_port );
     173int socket_bind_free_port(socket_ports_ref global_sockets, socket_core_ref socket, int free_ports_start, int free_ports_end, int last_used_port);
    174174
    175175/** Creates a new socket.
     
    182182 *  @returns ENOMEM if there is not enough memory left.
    183183 */
    184 int socket_create( socket_cores_ref local_sockets, int app_phone, void * specific_data, int * socket_id );
     184int socket_create(socket_cores_ref local_sockets, int app_phone, void * specific_data, int * socket_id);
    185185
    186186/** Destroys the socket.
     
    195195 *  @returns ENOTSOCK if the socket is not found.
    196196 */
    197 int socket_destroy( int packet_phone, int socket_id, socket_cores_ref local_sockets, socket_ports_ref global_sockets, void ( * socket_release )( socket_core_ref socket ));
     197int socket_destroy(int packet_phone, int socket_id, socket_cores_ref local_sockets, socket_ports_ref global_sockets, void (*socket_release)(socket_core_ref socket));
    198198
    199199/** Replies the packet or the packet queue data to the application via the socket.
     
    206206 *  @returns Other error codes as defined for the data_reply() function.
    207207 */
    208 int     socket_reply_packets( packet_t packet, size_t * length );
     208int socket_reply_packets(packet_t packet, size_t * length);
    209209
    210210/** Finds the bound port socket.
     
    216216 *  @returns NULL if no socket was found.
    217217 */
    218 socket_core_ref socket_port_find( socket_ports_ref global_sockets, int port, const char * key, size_t key_length );
     218socket_core_ref socket_port_find(socket_ports_ref global_sockets, int port, const char * key, size_t key_length);
    219219
    220220/** Releases the socket port.
     
    224224 *  @param[in] socket The socket to be unbound.
    225225 */
    226 void    socket_port_release( socket_ports_ref global_sockets, socket_core_ref socket );
     226void socket_port_release(socket_ports_ref global_sockets, socket_core_ref socket);
    227227
    228228/** Adds the socket to an already bound port.
     
    236236 *  @returns Other error codes as defined for the socket_port_add_core() function.
    237237 */
    238 int     socket_port_add( socket_ports_ref global_sockets, int port, socket_core_ref socket, const char * key, size_t key_length );
     238int socket_port_add(socket_ports_ref global_sockets, int port, socket_core_ref socket, const char * key, size_t key_length);
    239239
    240240#endif
Note: See TracChangeset for help on using the changeset viewer.