fwp_sched = fres_contract_get_block(vres->new, FRES_BLOCK_FWP_SCHED);
//fwp_fna_network_budget_to_bytes(FRSH_NETPF_FWP, &basic->budget, &vparams.budget);
- vparams.budget = basic->budget.tv_nsec;
+ vparams.budget = basic->budget.tv_nsec/1000000;
vparams.period = basic->period;
vparams.ac_id = fwp_sched->ac_id;
/* Create vres */
#lib_LIBRARIES = fwp
shared_LIBRARIES = fwp
-CFLAGS += -D_FWP_INTERNALS_ -DFWP_WITH_CONTNEGT
+CFLAGS += -D_FWP_INTERNALS_ #-DFWP_WITHOUT_CONTNEGT
SUBDIRS = tests
#LDFLAGS = -lpthread -lrt
fwp_SOURCES = fwp_utils.c fwp_vres.c fwp_msgb.c fwp_msgq.c fwp_endpoint.c fwp.c
unsigned int nr_connections;
/** client fdset */
fd_set fdset;
- fd_set testfds;
/** specific operation options*/
int flags;
};
FWP_DEBUG("FWP Send endpoint created.\n");
-#ifndef FWP_WITH_CONTNEGT
+#ifdef FWP_WITHOUT_CONTNEGT
/* Create vres with default parameters */
FWP_DEBUG("Creating default vres\n");
if (fwp_vres_create(&fwp_vres_params_default, &fwp_epoint->vresd)) {
FD_ZERO(&fwp_epoint->fdset);
/*add listen socket */
FD_SET(fwp_epoint->sockd, &fwp_epoint->fdset);
- fwp_epoint->testfds = fwp_epoint->fdset;
fwp_epoint->c_sockd =
(int*)malloc(fwp_epoint->attr.max_connections);
bzero(fwp_epoint->c_sockd, fwp_epoint->attr.max_connections);
int fwp_send_endpoint_bind(fwp_endpoint_d_t epointd, fwp_vres_d_t vresd)
{
int rv = 0;
-#ifdef FWP_WITH_CONTNEGT
+#ifndef FWP_WITHOUT_CONTNEGT
fwp_endpoint_t *fwp_epoint = epointd;
fwp_epoint->vresd = vresd;
/* consideration: move tx_queue to endpoint */
/**< queue for messages to send */
struct fwp_msgq tx_queue;
- int flags;
+ fwp_vres_flag_t flags;
/**< endpoint bounded to this vres */
/*fwp_endpoint_t *epoint; */
pthread_t tx_thread; /**< tx_thread id*/
pthread_attr_t tx_thread_attr;
int ac_sockd; /**< ac socket descriptor */
- fwp_sockaddr_t addr; /**< dest addr,for effectivness*/
};
typedef
/*inline int fwp_vres_get(fwp_vres_id_t vres_id, fwp_vres_t **vres )
{
- 3if ((vres_id < 0) || (vres_id > fwp_vres_table.nr_vres - 1))
+ if ((vres_id < 0) || (vres_id > fwp_vres_table.nr_vres - 1))
return -EINVAL;
*vres = &fwp_vres_table.entry[vres_id];
return 0;