]> rtime.felk.cvut.cz Git - frescor/fwp.git/blobdiff - fwp/lib/fwp/fwp_vres.h
Implemented synchronous and asynchronous sending
[frescor/fwp.git] / fwp / lib / fwp / fwp_vres.h
index 65bfd9177feae7802707ca0a5b7cfa6b8d76259a..4d36ffb1b4c351ed223bfe4e4b9cbaff50a2b0fd 100644 (file)
@@ -47,6 +47,7 @@
 #define _FWP_VRES_H
 
 #include <netinet/in.h>
+#include <stdbool.h>
 
 struct fwp_vres;
 typedef struct fwp_vres fwp_vres_t;
@@ -81,8 +82,6 @@ struct fwp_vres_params {
        /** all time units are in microseconds */       
        fwp_period_t    period; 
        fwp_ac_t        ac_id;          /**< AC id ~ priority of vres */
-       /** Forced source address. If non-zero, packets are sent over
-        * the specified interface. */
        struct in_addr  src;
 } fwp_vres_params_t;
 
@@ -94,8 +93,10 @@ int fwp_vres_set_params(fwp_vres_t *vres, fwp_vres_params_t *params);
 int fwp_vres_create(fwp_vres_params_t *params, fwp_vres_t **vresp);
 int fwp_vres_destroy(fwp_vres_t *vres);
 
-int fwp_vres_send(fwp_vres_t *vres, struct fwp_msgb* msgb);
-int fwp_vres_bind(fwp_vres_t *vres, int sockd);
+int fwp_vres_consume_budget(struct fwp_vres *vres, size_t size, bool can_block);
+struct fwp_endpoint;
+int fwp_vres_enqueue(struct fwp_vres *vres, struct fwp_endpoint *ep, void *msg, size_t size);
+int fwp_vres_bind(fwp_vres_t *vres, struct fwp_endpoint *ep, int sockd);
 int fwp_vres_unbind(fwp_vres_t *vres);
 
 extern fwp_vres_params_t fwp_vres_params_default;