Changeset ee603c4 in mainline for uspace/srv/udp/udp_type.h


Ignore:
Timestamp:
2012-04-04T21:10:22Z (12 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
92b42442
Parents:
4794417
Message:

UDP associations, sending datagrams.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/udp/udp_type.h

    r4794417 ree603c4  
    4141
    4242typedef enum {
    43         UDP_EOK
     43        UDP_EOK,
     44        /* Insufficient resources */
     45        UDP_ENORES,
     46        /* Foreign socket unspecified */
     47        UDP_EUNSPEC,
     48        /* No route to destination */
     49        UDP_ENOROUTE
    4450} udp_error_t;
    4551
     
    9298} udp_client_t;
    9399
     100/** UDP association
     101 *
     102 * This is a rough equivalent of a TCP connection endpoint. It allows
     103 * sending and receiving UDP datagrams and it is uniquely identified
     104 * by a socket pair.
     105 */
    94106typedef struct {
    95107        char *name;
     108        link_t link;
     109
     110        /** Association identification (local and foreign socket) */
    96111        udp_sockpair_t ident;
     112
     113        /** True if association was deleted by user */
     114        bool deleted;
     115
     116        /** Protects access to association structure */
     117        fibril_mutex_t lock;
     118        /** Reference count */
     119        atomic_t refcnt;
     120
     121        /** Receive queue */
     122        list_t rcv_queue;
     123        /** Receive queue CV. Broadcast when new datagram is inserted */
     124        fibril_condvar_t rcv_queue_cv;
    97125} udp_assoc_t;
    98126
Note: See TracChangeset for help on using the changeset viewer.