6 #include "fwp_contract.h"
8 #include "fwp_participant.h"
12 FWP_MSG_NEGREQ = 1<<2,
13 FWP_MSG_NEGRES = 1<<3,
14 FWP_MSG_RESERVE = 1<<4,
19 struct fwp_msg_header{
22 uint32_t app_id; /**< application id */
23 }__attribute__((packed));
25 struct fwp_msg_contract{
26 uint16_t budget; /**< bits per second */
27 uint32_t period_usec; /**< all time units are in microseconds */
28 }__attribute__((packed));
30 struct fwp_msg_vres_params{
31 uint16_t id; /**< STA-unique vres param id */
32 uint16_t budget; /**< bits per second */
33 uint32_t period_usec; /**< all time units are in microseconds */
34 uint8_t ac_id; /**< AC id ~ priority of vres */
36 }__attribute__((packed));
38 struct fwp_msg_hello {
42 }__attribute__((packed));
44 void fwp_msg_header_deflate(unsigned char *data, fwp_msg_type_t type,
45 fwp_participant_id_t participant_id);
46 void fwp_msg_header_inflate(unsigned char *data, fwp_msg_type_t *type,
47 fwp_participant_id_t *participant_id);
49 void fwp_msg_contract_deflate(unsigned char *data, struct fwp_contract *cont);
50 void fwp_msg_contract_inflate(unsigned char *data, struct fwp_contract *cont);
52 void fwp_msg_vres_params_deflate(unsigned char *data, unsigned int status,
53 fwp_vres_params_t *vparams);
54 void fwp_msg_vres_params_inflate(unsigned char *data, unsigned int *status,
55 fwp_vres_params_t *vparams);
57 void fwp_msg_hello_deflate(unsigned char *data,
58 fwp_participant_info_t *participant_info);
59 void fwp_msg_hello_inflate(unsigned char *data,
60 fwp_participant_info_t *participant_info);
62 #endif /* _FWP_MSG_H */