diff options
| author | yangwei <[email protected]> | 2024-07-23 19:04:55 +0800 |
|---|---|---|
| committer | yangwei <[email protected]> | 2024-07-24 09:56:56 +0800 |
| commit | bba15d7ffdd3e9add76a2d1e287a0899369ac96b (patch) | |
| tree | ade42e8e62a2f917d74bd3283f15e4d616369e2b /include | |
| parent | a91425ce46fdf3459924f6463af533ac8d2f3ce0 (diff) | |
✨ feat(packet api): support drop,printaddr,link_dir
Diffstat (limited to 'include')
| -rw-r--r-- | include/stellar/session.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/stellar/session.h b/include/stellar/session.h index 417fc2f..cc4a727 100644 --- a/include/stellar/session.h +++ b/include/stellar/session.h @@ -110,10 +110,21 @@ int session_set_preappend_segment_id_list(struct session *sess, uint16_t *sid, s const struct packet *session_get0_current_packet(struct session *sess); + +//flow direction #define PACKET_DIRECTION_C2S 0 #define PACKET_DIRECTION_S2C 1 #define PACKET_DIRECTION_UNKNOWN 2 int packet_get_direction(const struct packet *pkt); + +//route direction +#define PACKET_DIRECTION_INCOMING 0 +#define PACKET_DIRECTION_OUTGOING 1 +int packet_get_route_direction(const struct packet *pkt); + const char *packet_get0_data(const struct packet *pkt, size_t *data_len); int packet_arrive_time(const struct packet *pkt, struct timeval *ts); unsigned char packet_get_ip_protocol(struct packet *pkt); + +void packet_drop(const struct packet *pkt); +const char *packet_get0_readable_addr(struct packet *pkt);
\ No newline at end of file |
