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

posted @ 2017-05-02 19:30  Wasdns  阅读(341)  评论(0编辑  收藏  举报