欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 编程资源 > 编程问答 >内容正文

编程问答

FAST UA API

发布时间:2025/4/9 编程问答 31 豆豆
生活随笔 收集整理的这篇文章主要介绍了 FAST UA API 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

参考:

  • FAST_UA 编程手册

FAST DATA STRUCTURE

  • fast_packet

  • fast_metadata

  • fast_rule

  • fast_flow

FAST UA API

1.fast_ua_init()

int fast_ua_init(int fast_type);

function:

  • Register;

  • platform allocate MID

return: user MID

2.fast_ua_destroy()

void fast_ua_destroy(int mid);

function:

  • recover MID

  • free resources

return: NONE

3.fast_ua_send()

int fast_ua_send(struct fast_packet *pkt, int pkt_len);
  • struct fast_packet *pkt - 报文指针

  • int pkt_len - 报文长度

function:

  • FAST UA send messages

return: NONE

4.fast_ua_recv()

void fast_ua_recv(fast_ua_recv_callback callback);
  • fast_ua_recv_callback callback - 用于处理接收数据报文的回调函数

function:

  • FAST receive messages

return: NONE

5.fast_add_rule()

int fast_add_rule(struct fast_rule *rule);
  • struct fast_rule *rule - FAST 流表信息数据结构

function:

  • add flow table rules

return:

if success return index;

else return 0

6.fast_del_rule()

int fast_del_rule(int index);
  • index - 索引

function:

  • delete flow table rules

return:

if success return 1;

else return 0

7.fast_print_pkt()

void print_pkt(struct fast_packet *pkt, int pkt_len);

function:

  • print packet information(data structure)

return: NONE

8.fast_print_rule()

void print_hw_rule() ;

function:

  • print hardware rules

return: NONE

2017.5.2

转载于:https://www.cnblogs.com/qq952693358/p/6797970.html

总结

以上是生活随笔为你收集整理的FAST UA API的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。