Ignore:
Timestamp:
2012-02-12T19:36:32Z (12 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
df15e5f
Parents:
1493811
Message:

Need to limit iplink to a single client connection.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/inet/iplink_srv.h

    r1493811 r4f64a523  
    3737
    3838#include <async.h>
     39#include <fibril_synch.h>
     40#include <bool.h>
    3941#include <sys/types.h>
    4042
     
    4244
    4345typedef struct {
     46        fibril_mutex_t lock;
     47        bool connected;
    4448        struct iplink_ops *ops;
    4549        void *arg;
     50        async_sess_t *client_sess;
    4651} iplink_srv_t;
    47 
    48 typedef struct {
    49         iplink_srv_t *srv;
    50         async_sess_t *client_sess;
    51 } iplink_conn_t;
    5252
    5353typedef struct {
     
    6868
    6969typedef struct iplink_ops {
    70         int (*open)(iplink_conn_t *);
    71         int (*close)(iplink_conn_t *);
    72         int (*send)(iplink_conn_t *, iplink_srv_sdu_t *);
    73         int (*get_mtu)(iplink_conn_t *, size_t *);
     70        int (*open)(iplink_srv_t *);
     71        int (*close)(iplink_srv_t *);
     72        int (*send)(iplink_srv_t *, iplink_srv_sdu_t *);
     73        int (*get_mtu)(iplink_srv_t *, size_t *);
    7474} iplink_ops_t;
    7575
     76extern void iplink_srv_init(iplink_srv_t *);
     77
    7678extern int iplink_conn(ipc_callid_t, ipc_call_t *, void *);
    77 extern int iplink_ev_recv(iplink_conn_t *, iplink_srv_sdu_t *);
     79extern int iplink_ev_recv(iplink_srv_t *, iplink_srv_sdu_t *);
    7880
    7981#endif
Note: See TracChangeset for help on using the changeset viewer.