Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/net/tl/socket_core.c

    r0ab68f6 raaa3f33a  
    6868INT_MAP_IMPLEMENT(socket_cores, socket_core_t);
    6969
    70 GENERIC_CHAR_MAP_IMPLEMENT(socket_port_map, socket_core_ref);
     70GENERIC_CHAR_MAP_IMPLEMENT(socket_port_map, socket_core_t *);
    7171
    7272INT_MAP_IMPLEMENT(socket_ports, socket_port_t);
     
    8585 */
    8686static void
    87 socket_destroy_core(int packet_phone, socket_core_ref socket,
    88     socket_cores_ref local_sockets, socket_ports_ref global_sockets,
    89     void (* socket_release)(socket_core_ref socket))
     87socket_destroy_core(int packet_phone, socket_core_t *socket,
     88    socket_cores_t *local_sockets, socket_ports_t *global_sockets,
     89    void (* socket_release)(socket_core_t *socket))
    9090{
    9191        int packet_id;
     
    121121 */
    122122void
    123 socket_cores_release(int packet_phone, socket_cores_ref local_sockets,
    124     socket_ports_ref global_sockets,
    125     void (* socket_release)(socket_core_ref socket))
     123socket_cores_release(int packet_phone, socket_cores_t *local_sockets,
     124    socket_ports_t *global_sockets,
     125    void (* socket_release)(socket_core_t *socket))
    126126{
    127127        int index;
     
    160160 */
    161161static int
    162 socket_port_add_core(socket_port_ref socket_port, socket_core_ref socket,
     162socket_port_add_core(socket_port_t *socket_port, socket_core_t *socket,
    163163    const char *key, size_t key_length)
    164164{
    165         socket_core_ref *socket_ref;
     165        socket_core_t **socket_ref;
    166166        int rc;
    167167
     
    200200 */
    201201static int
    202 socket_bind_insert(socket_ports_ref global_sockets, socket_core_ref socket,
     202socket_bind_insert(socket_ports_t *global_sockets, socket_core_t *socket,
    203203    int port)
    204204{
    205         socket_port_ref socket_port;
     205        socket_port_t *socket_port;
    206206        int rc;
    207207
     
    258258 */
    259259int
    260 socket_bind(socket_cores_ref local_sockets, socket_ports_ref global_sockets,
     260socket_bind(socket_cores_t *local_sockets, socket_ports_t *global_sockets,
    261261    int socket_id, void *addr, size_t addrlen, int free_ports_start,
    262262    int free_ports_end, int last_used_port)
    263263{
    264         socket_core_ref socket;
    265         socket_port_ref socket_port;
     264        socket_core_t *socket;
     265        socket_port_t *socket_port;
    266266        struct sockaddr *address;
    267267        struct sockaddr_in *address_in;
     
    328328 */
    329329int
    330 socket_bind_free_port(socket_ports_ref global_sockets, socket_core_ref socket,
     330socket_bind_free_port(socket_ports_t *global_sockets, socket_core_t *socket,
    331331    int free_ports_start, int free_ports_end, int last_used_port)
    332332{
     
    370370 * @returns             ELIMIT if there is no socket identifier available.
    371371 */
    372 static int socket_generate_new_id(socket_cores_ref local_sockets, int positive)
     372static int socket_generate_new_id(socket_cores_t *local_sockets, int positive)
    373373{
    374374        int socket_id;
     
    415415 */
    416416int
    417 socket_create(socket_cores_ref local_sockets, int app_phone,
     417socket_create(socket_cores_t *local_sockets, int app_phone,
    418418    void *specific_data, int *socket_id)
    419419{
    420         socket_core_ref socket;
     420        socket_core_t *socket;
    421421        int positive;
    422422        int rc;
     
    437437        }
    438438       
    439         socket = (socket_core_ref) malloc(sizeof(*socket));
     439        socket = (socket_core_t *) malloc(sizeof(*socket));
    440440        if (!socket)
    441441                return ENOMEM;
     
    486486 */
    487487int
    488 socket_destroy(int packet_phone, int socket_id, socket_cores_ref local_sockets,
    489     socket_ports_ref global_sockets,
    490     void (*socket_release)(socket_core_ref socket))
    491 {
    492         socket_core_ref socket;
     488socket_destroy(int packet_phone, int socket_id, socket_cores_t *local_sockets,
     489    socket_ports_t *global_sockets,
     490    void (*socket_release)(socket_core_t *socket))
     491{
     492        socket_core_t *socket;
    493493        int accepted_id;
    494494
     
    601601 * @returns             NULL if no socket was found.
    602602 */
    603 socket_core_ref
    604 socket_port_find(socket_ports_ref global_sockets, int port, const char *key,
     603socket_core_t *
     604socket_port_find(socket_ports_t *global_sockets, int port, const char *key,
    605605    size_t key_length)
    606606{
    607         socket_port_ref socket_port;
    608         socket_core_ref *socket_ref;
     607        socket_port_t *socket_port;
     608        socket_core_t **socket_ref;
    609609
    610610        socket_port = socket_ports_find(global_sockets, port);
     
    628628 */
    629629void
    630 socket_port_release(socket_ports_ref global_sockets, socket_core_ref socket)
    631 {
    632         socket_port_ref socket_port;
    633         socket_core_ref *socket_ref;
     630socket_port_release(socket_ports_t *global_sockets, socket_core_t *socket)
     631{
     632        socket_port_t *socket_port;
     633        socket_core_t **socket_ref;
    634634
    635635        if (!socket->port)
     
    679679 */
    680680int
    681 socket_port_add(socket_ports_ref global_sockets, int port,
    682     socket_core_ref socket, const char *key, size_t key_length)
    683 {
    684         socket_port_ref socket_port;
     681socket_port_add(socket_ports_t *global_sockets, int port,
     682    socket_core_t *socket, const char *key, size_t key_length)
     683{
     684        socket_port_t *socket_port;
    685685        int rc;
    686686
Note: See TracChangeset for help on using the changeset viewer.