
Marking local functions: fci_spd_cmd_register fci_spd_cmd_query_cont_construct_reply


Marking externally visible functions: fci_spd_cmd


Marking externally visible variables:


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

strcpy/35 (strcpy) @0749eb60
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_spd_cmd_query_cont_construct_reply/21 
  Calls: 
pfe_spd_acc_add_rule/34 (pfe_spd_acc_add_rule) @0749e9a0
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_spd_cmd_register/22 
  Calls: 
memcpy/33 (memcpy) @0749e8c0
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_spd_cmd_query_cont_construct_reply/21 fci_spd_cmd_query_cont_construct_reply/21 fci_spd_cmd_register/22 fci_spd_cmd_register/22 
  Calls: 
pfe_spd_acc_get_rule/32 (pfe_spd_acc_get_rule) @0749e700
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_spd_cmd/23 
  Calls: 
pfe_spd_acc_remove_rule/31 (pfe_spd_acc_remove_rule) @0749e620
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_spd_cmd/23 
  Calls: 
pfe_if_db_entry_get_phy_if/30 (pfe_if_db_entry_get_phy_if) @0749e540
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_spd_cmd/23 
  Calls: 
pfe_if_db_unlock/29 (pfe_if_db_unlock) @0749e460
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_spd_cmd/23 
  Calls: 
pfe_if_db_get_first/28 (pfe_if_db_get_first) @0749e380
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_spd_cmd/23 
  Calls: 
pfe_if_db_lock/27 (pfe_if_db_lock) @0749e2a0
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_spd_cmd/23 
  Calls: 
pfe_feature_mgr_is_available/26 (pfe_feature_mgr_is_available) @0749e1c0
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_spd_cmd/23 
  Calls: 
memset/25 (memset) @0749e0e0
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_spd_cmd_query_cont_construct_reply/21 fci_spd_cmd/23 fci_spd_cmd/23 
  Calls: 
__context/24 (__context) @0749f168
  Type: variable
  Body removed by symtab_remove_unreachable_nodes
  Visibility: external public
  References: 
  Referring: fci_spd_cmd/23 (addr)
  Availability: not_available
  Varpool flags:
fci_spd_cmd/23 (fci_spd_cmd) @07586b60
  Type: function definition analyzed
  Visibility: externally_visible public
  References: __context/24 (addr)search_position/20 (write)search_position/20 (read)
  Referring: 
  Availability: available
  Function flags: body optimize_size
  Called by: 
  Calls: fci_spd_cmd_query_cont_construct_reply/21 pfe_spd_acc_get_rule/32 pfe_spd_acc_remove_rule/31 fci_spd_cmd_register/22 pfe_if_db_entry_get_phy_if/30 pfe_if_db_unlock/29 pfe_if_db_get_first/28 pfe_if_db_lock/27 memset/25 pfe_feature_mgr_is_available/26 memset/25 
fci_spd_cmd_register/22 (fci_spd_cmd_register) @075867e0
  Type: function definition analyzed
  Visibility: prevailing_def_ironly
  References: 
  Referring: 
  Availability: local
  Function flags: body local optimize_size
  Called by: fci_spd_cmd/23 
  Calls: pfe_spd_acc_add_rule/34 memcpy/33 memcpy/33 
fci_spd_cmd_query_cont_construct_reply/21 (fci_spd_cmd_query_cont_construct_reply) @07586540
  Type: function definition analyzed
  Visibility: prevailing_def_ironly
  References: search_position/20 (read)search_position/20 (read)search_position/20 (write)
  Referring: 
  Availability: local
  Function flags: body local optimize_size
  Called by: fci_spd_cmd/23 
  Calls: memcpy/33 memcpy/33 strcpy/35 memset/25 
search_position/20 (search_position) @075852d0
  Type: variable definition analyzed
  Visibility: prevailing_def_ironly
  References: 
  Referring: fci_spd_cmd/23 (write)fci_spd_cmd/23 (read)fci_spd_cmd_query_cont_construct_reply/21 (read)fci_spd_cmd_query_cont_construct_reply/21 (read)fci_spd_cmd_query_cont_construct_reply/21 (write)
  Availability: available
  Varpool flags: initialized
fci_spd_cmd (struct fci_msg_t * msg, uint16_t * fci_ret, struct fpp_spd_cmd_t * reply_buf, uint32_t * reply_len)
{
  struct pfe_ct_spd_entry_t spd_entry;
  struct pfe_phy_if_t * phy_if;
  struct pfe_if_db_entry_t * pfe_if_db_entry;
  struct fpp_spd_cmd_t * spd_cmd;
  errno_t ret;
  struct fci_t * fci_context;
  errno_t D.11975;

  <bb 2> :
  # DEBUG BEGIN_STMT
  fci_context = &__context;
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pfe_if_db_entry = 0B;
  # DEBUG BEGIN_STMT
  phy_if = 0B;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = *reply_len;
  if (_1 <= 67)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

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

  <bb 4> :
  # DEBUG BEGIN_STMT
  *reply_len = 0;
  # DEBUG BEGIN_STMT
  memset (&spd_entry, 0, 56);
  # DEBUG BEGIN_STMT
  _2 = pfe_feature_mgr_is_available ("IPsec");
  if (_2 == 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *fci_ret = 62034;
  # DEBUG BEGIN_STMT
  ret = 0;
  goto <bb 25>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  reply_buf.0_3 = reply_buf;
  memset (reply_buf.0_3, 0, 68);
  # DEBUG BEGIN_STMT
  spd_cmd = &msg->msg_cmd.payload;
  # DEBUG BEGIN_STMT
  _4 = &fci_context->if_session_id;
  ret = pfe_if_db_lock (_4);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

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

  <bb 8> :
  # DEBUG BEGIN_STMT
  _5 = fci_context->phy_if_db;
  _6 = fci_context->if_session_id;
  _7 = &spd_cmd->name;
  ret = pfe_if_db_get_first (_5, _6, 3, _7, &pfe_if_db_entry);
  # DEBUG BEGIN_STMT
  _8 = fci_context->if_session_id;
  _9 = pfe_if_db_unlock (_8);
  if (_9 != 0)
    goto <bb 9>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  *fci_ret = 61713;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret = 2;
  goto <bb 25>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 12>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 11> :
  pfe_if_db_entry.1_10 = pfe_if_db_entry;
  if (pfe_if_db_entry.1_10 == 0B)
    goto <bb 12>; [INV]
  else
    goto <bb 13>; [INV]

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

  <bb 13> :
  # DEBUG BEGIN_STMT
  pfe_if_db_entry.2_11 = pfe_if_db_entry;
  phy_if = pfe_if_db_entry_get_phy_if (pfe_if_db_entry.2_11);
  # DEBUG BEGIN_STMT
  if (phy_if == 0B)
    goto <bb 14>; [INV]
  else
    goto <bb 15>; [INV]

  <bb 14> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *fci_ret = 61700;
  # DEBUG BEGIN_STMT
  ret = 2;
  goto <bb 25>; [INV]

  <bb 15> :
  # DEBUG BEGIN_STMT
  _12 = spd_cmd->action;
  _13 = (int) _12;
  switch (_13) <default: <L23> [INV], case 0: <L13> [INV], case 1: <L14> [INV], case 6: <L18> [INV], case 7: <L19> [INV]>

  <bb 16> :
<L13>:
  # DEBUG BEGIN_STMT
  ret = fci_spd_cmd_register (phy_if, fci_ret, &spd_entry, spd_cmd);
  # DEBUG BEGIN_STMT
  goto <bb 25>; [INV]

  <bb 17> :
<L14>:
  # DEBUG BEGIN_STMT
  _14 = spd_cmd->position;
  _15 = _14 r>> 8;
  ret = pfe_spd_acc_remove_rule (phy_if, _15);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 18>; [INV]
  else
    goto <bb 19>; [INV]

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

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

  <bb 20> :
<L18>:
  # DEBUG BEGIN_STMT
  search_position = 0;

  <bb 21> :
<L19>:
  # DEBUG BEGIN_STMT
  search_position.3_16 = search_position;
  ret = pfe_spd_acc_get_rule (phy_if, search_position.3_16, &spd_entry);
  # DEBUG BEGIN_STMT
  if (ret == 0)
    goto <bb 22>; [INV]
  else
    goto <bb 23>; [INV]

  <bb 22> :
  # DEBUG BEGIN_STMT
  ret = fci_spd_cmd_query_cont_construct_reply (fci_ret, &reply_buf, reply_len, spd_entry, spd_cmd);
  goto <bb 25>; [INV]

  <bb 23> :
  # DEBUG BEGIN_STMT
  *fci_ret = 61700;
  # DEBUG BEGIN_STMT
  ret = 0;
  goto <bb 25>; [INV]

  <bb 24> :
<L23>:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *fci_ret = 4;
  # DEBUG BEGIN_STMT
  ret = 22;
  # DEBUG BEGIN_STMT

  <bb 25> :
  # DEBUG BEGIN_STMT
  D.11975 = ret;
  pfe_if_db_entry = {CLOBBER};
  spd_entry = {CLOBBER};
  return D.11975;

}


fci_spd_cmd_register (struct pfe_phy_if_t * phy_if, uint16_t * fci_ret, struct pfe_ct_spd_entry_t * spd_entry, const struct fpp_spd_cmd_t * spd_cmd)
{
  errno_t ret;
  errno_t D.11988;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = spd_cmd->flags;
  _2 = (unsigned int) _1;
  _3 = _2 & 2;
  if (_3 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _4 = spd_entry->flags;
  _5 = _4 | 2;
  spd_entry->flags = _5;
  # DEBUG BEGIN_STMT
  _6 = &spd_entry->ipv.v6.sip;
  _7 = &spd_cmd->saddr[0];
  memcpy (_6, _7, 16);
  # DEBUG BEGIN_STMT
  _8 = &spd_entry->ipv.v6.dip;
  _9 = &spd_cmd->daddr[0];
  memcpy (_8, _9, 16);
  goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _10 = spd_cmd->saddr[0];
  spd_entry->ipv.v4.sip = _10;
  # DEBUG BEGIN_STMT
  _11 = spd_cmd->daddr[0];
  spd_entry->ipv.v4.dip = _11;

  <bb 5> :
  # DEBUG BEGIN_STMT
  _12 = spd_cmd->flags;
  _13 = (unsigned int) _12;
  _14 = _13 & 4;
  if (_14 != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  _15 = spd_entry->flags;
  _16 = _15 | 4;
  spd_entry->flags = _16;

  <bb 7> :
  # DEBUG BEGIN_STMT
  _17 = spd_cmd->flags;
  _18 = (unsigned int) _17;
  _19 = _18 & 8;
  if (_19 != 0)
    goto <bb 8>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  _20 = spd_entry->flags;
  _21 = _20 | 8;
  spd_entry->flags = _21;

  <bb 9> :
  # DEBUG BEGIN_STMT
  _22 = spd_cmd->protocol;
  spd_entry->proto = _22;
  # DEBUG BEGIN_STMT
  _23 = spd_cmd->sport;
  spd_entry->sport = _23;
  # DEBUG BEGIN_STMT
  _24 = spd_cmd->dport;
  spd_entry->dport = _24;
  # DEBUG BEGIN_STMT
  _25 = spd_cmd->sa_id;
  spd_entry->sad_entry = _25;
  # DEBUG BEGIN_STMT
  _26 = spd_cmd->spi;
  spd_entry->spi = _26;
  # DEBUG BEGIN_STMT
  _27 = spd_cmd->spd_action;
  spd_entry->action = _27;
  # DEBUG BEGIN_STMT
  _28 = spd_cmd->position;
  _29 = _28 r>> 8;
  ret = pfe_spd_acc_add_rule (phy_if, _29, spd_entry);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 10>; [INV]
  else
    goto <bb 11>; [INV]

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

  <bb 11> :
  # DEBUG BEGIN_STMT
  *fci_ret = 0;

  <bb 12> :
  # DEBUG BEGIN_STMT
  D.11988 = ret;
  return D.11988;

}


fci_spd_cmd_query_cont_construct_reply (uint16_t * fci_ret, struct fpp_spd_cmd_t * * reply_buf, uint32_t * reply_len, const struct pfe_ct_spd_entry_t spd_entry, const struct fpp_spd_cmd_t * spd_cmd)
{
  errno_t ret;
  errno_t D.11997;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = *reply_buf;
  memset (_1, 0, 68);
  # DEBUG BEGIN_STMT
  _2 = *reply_buf;
  _3 = &_2->name;
  _4 = &spd_cmd->name;
  strcpy (_3, _4);
  # DEBUG BEGIN_STMT
  _5 = spd_entry.flags;
  _6 = (int) _5;
  _7 = _6 & 2;
  if (_7 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _8 = *reply_buf;
  _9 = _8->flags;
  _10 = *reply_buf;
  _11 = _9 | 2;
  _10->flags = _11;
  # DEBUG BEGIN_STMT
  _12 = *reply_buf;
  _13 = &_12->saddr[0];
  memcpy (_13, &spd_entry.ipv.v6.sip[0], 16);
  # DEBUG BEGIN_STMT
  _14 = *reply_buf;
  _15 = &_14->daddr[0];
  memcpy (_15, &spd_entry.ipv.v6.dip[0], 16);
  goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _16 = *reply_buf;
  _17 = spd_entry.ipv.v4.sip;
  _16->saddr[0] = _17;
  # DEBUG BEGIN_STMT
  _18 = *reply_buf;
  _19 = spd_entry.ipv.v4.dip;
  _18->daddr[0] = _19;

  <bb 5> :
  # DEBUG BEGIN_STMT
  _20 = spd_entry.flags;
  _21 = (int) _20;
  _22 = _21 & 4;
  if (_22 != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  _23 = *reply_buf;
  _24 = _23->flags;
  _25 = *reply_buf;
  _26 = _24 | 4;
  _25->flags = _26;

  <bb 7> :
  # DEBUG BEGIN_STMT
  _27 = spd_entry.flags;
  _28 = (int) _27;
  _29 = _28 & 8;
  if (_29 != 0)
    goto <bb 8>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  _30 = *reply_buf;
  _31 = _30->flags;
  _32 = *reply_buf;
  _33 = _31 | 8;
  _32->flags = _33;

  <bb 9> :
  # DEBUG BEGIN_STMT
  _34 = *reply_buf;
  _35 = spd_entry.proto;
  _34->protocol = _35;
  # DEBUG BEGIN_STMT
  _36 = *reply_buf;
  _37 = spd_entry.sport;
  _36->sport = _37;
  # DEBUG BEGIN_STMT
  _38 = *reply_buf;
  _39 = spd_entry.dport;
  _38->dport = _39;
  # DEBUG BEGIN_STMT
  _40 = *reply_buf;
  _41 = spd_entry.sad_entry;
  _40->sa_id = _41;
  # DEBUG BEGIN_STMT
  _42 = *reply_buf;
  _43 = spd_entry.spi;
  _42->spi = _43;
  # DEBUG BEGIN_STMT
  _44 = *reply_buf;
  _45 = spd_entry.action;
  _44->spd_action = _45;
  # DEBUG BEGIN_STMT
  search_position.4_46 = search_position;
  _47 = *reply_buf;
  _48 = search_position.4_46 r>> 8;
  _47->position = _48;
  # DEBUG BEGIN_STMT
  search_position.5_49 = search_position;
  search_position.6_50 = search_position.5_49;
  _51 = search_position.6_50 + 1;
  search_position = _51;
  # DEBUG BEGIN_STMT
  *fci_ret = 0;
  # DEBUG BEGIN_STMT
  *reply_len = 68;
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  D.11997 = ret;
  return D.11997;

}


