#include <sys/time.h>
#include <frsh.h>
+#include <frsh_core_types.h>
+
long int udp_budget, udp_period;
typedef struct {
frsh_vres_id_t vres;
frsh_send_endpoint_protocol_info_t send_pinfo;
frsh_contract_t contract;
+ frsh_contract_label_t label;
frsh_rel_time_t budget, period;
} UDPContext;
FRSH_CT_REGULAR);
//if (ret) PERROR_AND_EXIT(ret, "frsh_contract_set_basic_params");
if (ret) return -1;
- snprintf(netcont_name, sizeof(netcont_name), "net_cont%d", ++netcont_num);
+ snprintf(netcont_name, sizeof(netcont_name), "ffmpeg%02d", ++netcont_num);
ret = frsh_contract_set_resource_and_label(&s->contract,FRSH_RT_NETWORK,
- FRSH_NETPF_FWP, netcont_name);
+ FRSH_NETPF_FWP,
+ s->label[0] ? s->label : netcont_name);
//if (ret) PERROR_AND_EXIT(ret, "frsh_contract_set_resource_and_label");
if (ret) return -1;
if (find_info_tag(buf, sizeof(buf), "buffer_size", p)) {
s->buffer_size = strtol(buf, NULL, 10);
}
+ if (!find_info_tag(s->label, sizeof(s->label),
+ "contract_label", p)) {
+ s->label[0]=0;
+ }
}
/* fill the dest addr */