
Marking local functions: fci_fp_construct_rule_reply


Marking externally visible functions: fci_fp_rule_cmd fci_fp_table_cmd


Marking externally visible variables:


Reclaiming functions:
Reclaiming variables:
Clearing address taken flags:
Symbol table:

fci_fp_db_get_next_rule/33 (fci_fp_db_get_next_rule) @0758fd20
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_fp_rule_cmd/22 
  Calls: 
fci_fp_db_get_first_rule/32 (fci_fp_db_get_first_rule) @0758fc40
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_fp_rule_cmd/22 
  Calls: 
fci_fp_db_destroy_rule/31 (fci_fp_db_destroy_rule) @0758fb60
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_fp_rule_cmd/22 
  Calls: 
fci_fp_db_create_rule/30 (fci_fp_db_create_rule) @0758fa80
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_fp_rule_cmd/22 
  Calls: 
strncpy/29 (strncpy) @0758f700
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_fp_construct_rule_reply/20 fci_fp_construct_rule_reply/20 
  Calls: 
fci_fp_db_get_table_next_rule/28 (fci_fp_db_get_table_next_rule) @0758f540
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_fp_table_cmd/21 
  Calls: 
fci_fp_db_get_table_first_rule/27 (fci_fp_db_get_table_first_rule) @0758f460
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_fp_table_cmd/21 
  Calls: 
fci_fp_db_remove_rule_from_table/26 (fci_fp_db_remove_rule_from_table) @0758f380
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_fp_table_cmd/21 
  Calls: 
fci_fp_db_add_rule_to_table/25 (fci_fp_db_add_rule_to_table) @0758f2a0
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_fp_table_cmd/21 
  Calls: 
fci_fp_db_destroy_table/24 (fci_fp_db_destroy_table) @0758f1c0
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_fp_table_cmd/21 
  Calls: 
fci_fp_db_create_table/23 (fci_fp_db_create_table) @0758f0e0
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_fp_table_cmd/21 
  Calls: 
fci_fp_rule_cmd/22 (fci_fp_rule_cmd) @07493d20
  Type: function definition analyzed
  Visibility: externally_visible public
  References: 
  Referring: 
  Availability: available
  Function flags: body optimize_size
  Called by: 
  Calls: fci_fp_construct_rule_reply/20 fci_fp_db_get_next_rule/33 fci_fp_construct_rule_reply/20 fci_fp_db_get_first_rule/32 fci_fp_db_destroy_rule/31 fci_fp_db_create_rule/30 
fci_fp_table_cmd/21 (fci_fp_table_cmd) @07493a80
  Type: function definition analyzed
  Visibility: externally_visible public
  References: 
  Referring: 
  Availability: available
  Function flags: body optimize_size
  Called by: 
  Calls: fci_fp_construct_rule_reply/20 fci_fp_db_get_table_next_rule/28 fci_fp_construct_rule_reply/20 fci_fp_db_get_table_first_rule/27 fci_fp_db_remove_rule_from_table/26 fci_fp_db_add_rule_to_table/25 fci_fp_db_destroy_table/24 fci_fp_db_create_table/23 
fci_fp_construct_rule_reply/20 (fci_fp_construct_rule_reply) @074937e0
  Type: function definition analyzed
  Visibility: prevailing_def_ironly
  References: 
  Referring: 
  Availability: local
  Function flags: body local optimize_size
  Called by: fci_fp_rule_cmd/22 fci_fp_rule_cmd/22 fci_fp_table_cmd/21 fci_fp_table_cmd/21 
  Calls: strncpy/29 strncpy/29 
fci_fp_rule_cmd (struct fci_msg_t * msg, uint16_t * fci_ret, struct fpp_fp_rule_cmd_t * reply_buf, uint32_t * reply_len)
{
  char * next_rule;
  struct fci_fp_rule_info_t rule;
  char * next_rule;
  struct fci_fp_rule_info_t rule;
  pfe_ct_fp_flags_t flags;
  errno_t ret;
  struct fpp_fp_rule_cmd_t * fp_cmd;
  errno_t D.12041;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  _1 = *reply_len;
  if (_1 <= 47)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret = 22;
  goto <bb 32>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  *reply_len = 0;
  # DEBUG BEGIN_STMT
  fp_cmd = &msg->msg_cmd.payload;
  # DEBUG BEGIN_STMT
  _2 = fp_cmd->action;
  _3 = (int) _2;
  switch (_3) <default: <L36> [INV], case 0: <L2> [INV], case 1: <L22> [INV], case 6: <L26> [INV], case 7: <L31> [INV]>

  <bb 5> :
<L2>:
  # DEBUG BEGIN_STMT
  flags = 0;
  # DEBUG BEGIN_STMT
  _4 = fp_cmd->r.match_action;
  _5 = (int) _4;
  switch (_5) <default: <L6> [INV], case 0: <L3> [INV], case 1: <L4> [INV], case 2: <L40> [INV]>

  <bb 6> :
<L3>:
  # DEBUG BEGIN_STMT
  flags = flags | 4;
  # DEBUG BEGIN_STMT
  goto <bb 9>; [INV]

  <bb 7> :
<L4>:
  # DEBUG BEGIN_STMT
  flags = flags | 2;
  # DEBUG BEGIN_STMT
  goto <bb 9>; [INV]

  <bb 8> :
<L6>:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *fci_ret = 3;
  # DEBUG BEGIN_STMT
  ret = 22;

  <bb 9> :
<L40>:
  # DEBUG BEGIN_STMT
  if (ret == 0)
    goto <bb 10>; [INV]
  else
    goto <bb 32>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  _6 = fp_cmd->r.offset_from;
  _7 = (int) _6;
  switch (_7) <default: <L12> [INV], case 2: <L41> [INV], case 3: <L10> [INV], case 4: <L11> [INV]>

  <bb 11> :
<L10>:
  # DEBUG BEGIN_STMT
  flags = flags | 8;
  # DEBUG BEGIN_STMT
  goto <bb 14>; [INV]

  <bb 12> :
<L11>:
  # DEBUG BEGIN_STMT
  flags = flags | 16;
  # DEBUG BEGIN_STMT
  goto <bb 14>; [INV]

  <bb 13> :
<L12>:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *fci_ret = 3;
  # DEBUG BEGIN_STMT
  ret = 22;

  <bb 14> :
<L41>:
  # DEBUG BEGIN_STMT
  if (ret == 0)
    goto <bb 15>; [INV]
  else
    goto <bb 32>; [INV]

  <bb 15> :
  # DEBUG BEGIN_STMT
  _8 = fp_cmd->r.invert;
  if (_8 == 1)
    goto <bb 16>; [INV]
  else
    goto <bb 17>; [INV]

  <bb 16> :
  # DEBUG BEGIN_STMT
  flags = flags | 1;

  <bb 17> :
  # DEBUG BEGIN_STMT
  _9 = &fp_cmd->r.rule_name;
  _10 = fp_cmd->r.data;
  _11 = fp_cmd->r.mask;
  _12 = fp_cmd->r.offset;
  _13 = &fp_cmd->r.next_rule_name;
  ret = fci_fp_db_create_rule (_9, _10, _11, _12, flags, _13);
  # DEBUG BEGIN_STMT
  if (ret == 0)
    goto <bb 18>; [INV]
  else
    goto <bb 19>; [INV]

  <bb 18> :
  # DEBUG BEGIN_STMT
  *fci_ret = 0;
  goto <bb 32>; [INV]

  <bb 19> :
  # DEBUG BEGIN_STMT
  *fci_ret = 3;
  goto <bb 32>; [INV]

  <bb 20> :
<L22>:
  # DEBUG BEGIN_STMT
  _14 = &fp_cmd->r.rule_name;
  ret = fci_fp_db_destroy_rule (_14);
  # DEBUG BEGIN_STMT
  if (ret == 0)
    goto <bb 21>; [INV]
  else
    goto <bb 22>; [INV]

  <bb 21> :
  # DEBUG BEGIN_STMT
  *fci_ret = 0;
  goto <bb 32>; [INV]

  <bb 22> :
  # DEBUG BEGIN_STMT
  *fci_ret = 3;
  goto <bb 32>; [INV]

  <bb 23> :
<L26>:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret = fci_fp_db_get_first_rule (&rule, &next_rule);
  # DEBUG BEGIN_STMT
  if (ret == 0)
    goto <bb 24>; [INV]
  else
    goto <bb 25>; [INV]

  <bb 24> :
  # DEBUG BEGIN_STMT
  _15 = &reply_buf->r;
  _16 = rule.rule_name;
  next_rule.2_17 = next_rule;
  _18 = rule.data;
  _19 = rule.mask;
  _20 = rule.offset;
  _21 = rule.flags;
  fci_fp_construct_rule_reply (_15, _16, next_rule.2_17, _18, _19, _20, _21);
  # DEBUG BEGIN_STMT
  *fci_ret = 0;
  # DEBUG BEGIN_STMT
  *reply_len = 48;
  goto <bb 26>; [INV]

  <bb 25> :
  # DEBUG BEGIN_STMT
  *fci_ret = 61986;

  <bb 26> :
  # DEBUG BEGIN_STMT
  rule = {CLOBBER};
  next_rule = {CLOBBER};
  goto <bb 32>; [INV]

  <bb 27> :
<L31>:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret = fci_fp_db_get_next_rule (&rule, &next_rule);
  # DEBUG BEGIN_STMT
  if (ret == 0)
    goto <bb 28>; [INV]
  else
    goto <bb 29>; [INV]

  <bb 28> :
  # DEBUG BEGIN_STMT
  _22 = &reply_buf->r;
  _23 = rule.rule_name;
  next_rule.3_24 = next_rule;
  _25 = rule.data;
  _26 = rule.mask;
  _27 = rule.offset;
  _28 = rule.flags;
  fci_fp_construct_rule_reply (_22, _23, next_rule.3_24, _25, _26, _27, _28);
  # DEBUG BEGIN_STMT
  *fci_ret = 0;
  # DEBUG BEGIN_STMT
  *reply_len = 48;
  goto <bb 30>; [INV]

  <bb 29> :
  # DEBUG BEGIN_STMT
  *fci_ret = 61986;

  <bb 30> :
  # DEBUG BEGIN_STMT
  rule = {CLOBBER};
  next_rule = {CLOBBER};
  goto <bb 32>; [INV]

  <bb 31> :
<L36>:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *fci_ret = 4;
  # DEBUG BEGIN_STMT

  <bb 32> :
  # DEBUG BEGIN_STMT
  D.12041 = ret;
  return D.12041;

}


fci_fp_table_cmd (struct fci_msg_t * msg, uint16_t * fci_ret, struct fpp_fp_table_cmd_t * reply_buf, uint32_t * reply_len)
{
  char * next_rule;
  struct fci_fp_rule_info_t rule;
  errno_t ret;
  struct fpp_fp_table_cmd_t * fp_cmd;
  errno_t D.12000;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = *reply_len;
  if (_1 <= 47)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret = 22;
  goto <bb 24>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  *reply_len = 0;
  # DEBUG BEGIN_STMT
  fp_cmd = &msg->msg_cmd.payload;
  # DEBUG BEGIN_STMT
  _2 = fp_cmd->action;
  _3 = (int) _2;
  switch (_3) <default: <L26> [INV], case 0: <L2> [INV], case 1: <L6> [INV], case 6: <L18> [INV], case 7: <L22> [INV], case 10: <L10> [INV], case 11: <L14> [INV]>

  <bb 5> :
<L2>:
  # DEBUG BEGIN_STMT
  _4 = &fp_cmd->table_info.t.table_name;
  ret = fci_fp_db_create_table (_4);
  # DEBUG BEGIN_STMT
  if (ret == 0)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  *fci_ret = 0;
  goto <bb 24>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  *fci_ret = 3;
  goto <bb 24>; [INV]

  <bb 8> :
<L6>:
  # DEBUG BEGIN_STMT
  _5 = &fp_cmd->table_info.t.table_name;
  ret = fci_fp_db_destroy_table (_5, 0);
  # DEBUG BEGIN_STMT
  if (ret == 0)
    goto <bb 9>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  *fci_ret = 0;
  goto <bb 24>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  *fci_ret = 3;
  goto <bb 24>; [INV]

  <bb 11> :
<L10>:
  # DEBUG BEGIN_STMT
  _6 = &fp_cmd->table_info.t.table_name;
  _7 = &fp_cmd->table_info.t.rule_name;
  _8 = fp_cmd->table_info.t.position;
  _9 = _8 r>> 8;
  ret = fci_fp_db_add_rule_to_table (_6, _7, _9);
  # DEBUG BEGIN_STMT
  if (ret == 0)
    goto <bb 12>; [INV]
  else
    goto <bb 13>; [INV]

  <bb 12> :
  # DEBUG BEGIN_STMT
  *fci_ret = 0;
  goto <bb 24>; [INV]

  <bb 13> :
  # DEBUG BEGIN_STMT
  *fci_ret = 3;
  goto <bb 24>; [INV]

  <bb 14> :
<L14>:
  # DEBUG BEGIN_STMT
  _10 = &fp_cmd->table_info.t.rule_name;
  ret = fci_fp_db_remove_rule_from_table (_10);
  # DEBUG BEGIN_STMT
  if (ret == 0)
    goto <bb 15>; [INV]
  else
    goto <bb 16>; [INV]

  <bb 15> :
  # DEBUG BEGIN_STMT
  *fci_ret = 0;
  goto <bb 24>; [INV]

  <bb 16> :
  # DEBUG BEGIN_STMT
  *fci_ret = 3;
  goto <bb 24>; [INV]

  <bb 17> :
<L18>:
  # DEBUG BEGIN_STMT
  rule.rule_name = 0B;
  # DEBUG BEGIN_STMT
  next_rule = 0B;
  # DEBUG BEGIN_STMT
  _11 = &fp_cmd->table_info.t.table_name;
  ret = fci_fp_db_get_table_first_rule (_11, &rule, &next_rule);
  # DEBUG BEGIN_STMT
  if (ret == 0)
    goto <bb 18>; [INV]
  else
    goto <bb 19>; [INV]

  <bb 18> :
  # DEBUG BEGIN_STMT
  _12 = &reply_buf->table_info.r;
  _13 = rule.rule_name;
  next_rule.0_14 = next_rule;
  _15 = rule.data;
  _16 = rule.mask;
  _17 = rule.offset;
  _18 = rule.flags;
  fci_fp_construct_rule_reply (_12, _13, next_rule.0_14, _15, _16, _17, _18);
  # DEBUG BEGIN_STMT
  *fci_ret = 0;
  # DEBUG BEGIN_STMT
  *reply_len = 48;
  goto <bb 24>; [INV]

  <bb 19> :
  # DEBUG BEGIN_STMT
  *fci_ret = 61986;
  goto <bb 24>; [INV]

  <bb 20> :
<L22>:
  # DEBUG BEGIN_STMT
  _19 = &fp_cmd->table_info.t.table_name;
  ret = fci_fp_db_get_table_next_rule (_19, &rule, &next_rule);
  # DEBUG BEGIN_STMT
  if (ret == 0)
    goto <bb 21>; [INV]
  else
    goto <bb 22>; [INV]

  <bb 21> :
  # DEBUG BEGIN_STMT
  _20 = &reply_buf->table_info.r;
  _21 = rule.rule_name;
  next_rule.1_22 = next_rule;
  _23 = rule.data;
  _24 = rule.mask;
  _25 = rule.offset;
  _26 = rule.flags;
  fci_fp_construct_rule_reply (_20, _21, next_rule.1_22, _23, _24, _25, _26);
  # DEBUG BEGIN_STMT
  *fci_ret = 0;
  # DEBUG BEGIN_STMT
  *reply_len = 48;
  goto <bb 24>; [INV]

  <bb 22> :
  # DEBUG BEGIN_STMT
  *fci_ret = 61986;
  goto <bb 24>; [INV]

  <bb 23> :
<L26>:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *fci_ret = 4;
  # DEBUG BEGIN_STMT

  <bb 24> :
  # DEBUG BEGIN_STMT
  D.12000 = ret;
  rule = {CLOBBER};
  next_rule = {CLOBBER};
  return D.12000;

}


fci_fp_construct_rule_reply (struct fpp_fp_rule_props_t * r, char * rule_name, char * next_rule, uint32_t data, uint32_t mask, uint16_t offset, pfe_ct_fp_flags_t flags)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = &r->rule_name;
  strncpy (_1, rule_name, 15);
  # DEBUG BEGIN_STMT
  r->data = data;
  # DEBUG BEGIN_STMT
  r->mask = mask;
  # DEBUG BEGIN_STMT
  r->offset = offset;
  # DEBUG BEGIN_STMT
  if (next_rule != 0B)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _2 = &r->next_rule_name;
  strncpy (_2, next_rule, 15);

  <bb 4> :
  # DEBUG BEGIN_STMT
  _3 = (unsigned int) flags;
  _4 = _3 & 4;
  if (_4 != 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  r->match_action = 0;
  goto <bb 9>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  _5 = (unsigned int) flags;
  _6 = _5 & 2;
  if (_6 != 0)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  r->match_action = 1;
  goto <bb 9>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  r->match_action = 2;

  <bb 9> :
  # DEBUG BEGIN_STMT
  _7 = (unsigned int) flags;
  _8 = _7 & 1;
  if (_8 != 0)
    goto <bb 10>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  r->invert = 1;
  goto <bb 12>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  r->invert = 0;

  <bb 12> :
  # DEBUG BEGIN_STMT
  _9 = (unsigned int) flags;
  _10 = _9 & 8;
  if (_10 != 0)
    goto <bb 13>; [INV]
  else
    goto <bb 14>; [INV]

  <bb 13> :
  # DEBUG BEGIN_STMT
  r->offset_from = 3;
  goto <bb 17>; [INV]

  <bb 14> :
  # DEBUG BEGIN_STMT
  _11 = (unsigned int) flags;
  _12 = _11 & 16;
  if (_12 != 0)
    goto <bb 15>; [INV]
  else
    goto <bb 16>; [INV]

  <bb 15> :
  # DEBUG BEGIN_STMT
  r->offset_from = 4;
  goto <bb 17>; [INV]

  <bb 16> :
  # DEBUG BEGIN_STMT
  r->offset_from = 2;

  <bb 17> :
  return;

}


