【修改】更新依赖的stellar头文件
This commit is contained in:
37
dependence/include/stellar/packet_manager.h
Normal file
37
dependence/include/stellar/packet_manager.h
Normal file
@@ -0,0 +1,37 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include "stellar/exdata.h"
|
||||
#include "stellar/packet.h"
|
||||
|
||||
enum packet_stage
|
||||
{
|
||||
PACKET_STAGE_PREROUTING,
|
||||
PACKET_STAGE_INPUT,
|
||||
PACKET_STAGE_FORWARD,
|
||||
PACKET_STAGE_OUTPUT,
|
||||
PACKET_STAGE_POSTROUTING,
|
||||
PACKET_STAGE_MAX,
|
||||
};
|
||||
|
||||
struct packet_manager;
|
||||
|
||||
int packet_manager_new_packet_exdata_index(struct packet_manager *pkt_mgr, const char *name, exdata_free *func, void *arg);
|
||||
|
||||
typedef void on_packet_stage_callback(enum packet_stage stage, struct packet *pkt, void *args);
|
||||
int packet_manager_subscribe(struct packet_manager *pkt_mgr, enum packet_stage stage, on_packet_stage_callback *cb, void *args);
|
||||
|
||||
// if two modules claim the same packet at the same stage, the second 'claim' fails.
|
||||
// return 0 on success
|
||||
// return -1 on failure
|
||||
typedef void on_packet_claimed_callback(struct packet *pkt, void *args);
|
||||
int packet_manager_claim_packet(struct packet_manager *pkt_mgr, uint16_t thread_id, struct packet *pkt, on_packet_claimed_callback cb, void *args);
|
||||
void packet_manager_schedule_packet(struct packet_manager *pkt_mgr, uint16_t thread_id, struct packet *pkt, enum packet_stage stage);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user