summaryrefslogtreecommitdiff
path: root/src/tsg_sync_state.h
blob: 2a900fa9ded4fae55e07158f0333cb7492e5b4b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef TSG_SESSION_STATE_H
#define TSG_SESSION_STATE_H

#include <stdint.h>
#include <MESA/stream.h>

enum policy_type
{
    POLICY_UPDATE_SERVICE_CHAINING = 0, 
    POLICY_UPDATE_SHAPING,
    POLICY_UPDATE_MAX
};

struct update_policy
{
	enum policy_type type; 
	int id_num;
	int ids[8];
};

// i don't need this 
struct parse_handle 
{
    char tsync[8];
    uint64_t session_id;
    char state[8];
    char method[16];
    struct update_policy sf_ids;
};

int tsg_sync_resetall_state(const struct streaminfo *a_stream);
int tsg_send_session_state(const struct streaminfo *a_stream, unsigned char state);
int tsg_sync_opening_state(const struct streaminfo *a_stream, unsigned char state);
int tsg_sync_closing_state(const struct streaminfo *a_stream, unsigned char state);
int tsg_sync_policy_update(const struct streaminfo *a_stream, struct update_policy *policy_array, int policy_array_num);

int tsg_recv_control_pkt(const struct streaminfo *a_stream, const void *payload, int payload_len);


#endif //TSG_SESSION_STATE_H