[sr-dev] Pike RPC

Kelvin Chua kelchy at gmail.com
Wed Aug 24 09:47:49 CEST 2016


Is there any reason why the Pike RPC is not returning an array and instead
using integer suffixes? ip_addr0, ip_addr1, etc

If it will not break anything I would like to change this behavior.

here is a sample:

{
   "max_hits":16,
   "ip_addr0":"XX0.5X.X3.1XX",
   "leaf_hits_prev0":51,
   "leaf_hits_curr0":9,
   "expires0":4,
   "status0":"HOT",
   "ip_addr1":"XX8.1X9.8.X7",
   "leaf_hits_prev1":17,
   "leaf_hits_curr1":0,
   "expires1":2,
   "status1":"HOT",
   "number_of_rows":2
}


here is what i propose:

{
  "max_hits":16,
   "number_of_rows":2,
   "list" :
   [
      {
         "ip_addr":"XX0.5X.X3.1XX",
         "leaf_hits_prev":51,
         "leaf_hits_curr":9,
         "expires":4,
         "status":"HOT"
      },
      {
         "ip_addr":"XX8.1X9.8.X7",
         "leaf_hits_prev":17,
         "leaf_hits_curr":0,
         "expires":2,
         "status":"HOT"
      }
   ]
}

Kelvin Chua
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20160824/266b6a9b/attachment-0001.html>


More information about the sr-dev mailing list