summaryrefslogtreecommitdiff
path: root/include/job_ctx.h
blob: 9d6410acfcca1403ec551fce3099da85910a870f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#pragma once
#include "marsio.h"
#include <uuid/uuid.h>

struct dp_trace_telemetry_desc
{
    uuid_t uuid;
    struct dp_trace_job_desc job_desc;
};

void job_rule_apply(struct dp_trace_job_desc desc[], unsigned int nr_desc);
int job_id_to_index(job_bitmap_t job_id);
job_bitmap_t index_to_job_id(unsigned int index);
int is_job_id_used(job_bitmap_t job_id);
uint8_t job_id_role_get(job_bitmap_t job_id);

void telemetry_job_add_cb(const char * table_name, const char * key, const char * table_line, void ** ad, long argl,
                          void * argp);
void telemetry_job_del_cb(const char * table_name, void ** ad, long argl, void * argp);
void telemetry_job_uuid_get(job_bitmap_t job_id, unsigned char * uu);

void job_desc_dump(const struct dp_trace_job_desc * desc);
int is_valid_bpf_expression(const char * expr);