summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYasufumi Ogawa <yasufum.o@gmail.com>2019-09-17 19:35:00 +0900
committerYasufumi Ogawa <yasufum.o@gmail.com>2019-10-04 22:06:14 +0900
commit6ad8f811fa7377cee151c407231786a91aebb146 (patch)
tree078c09f6fba66463609695a16eda533e19941a0d
parent7dc00bd770b584243b5ed0caa9c3db3ef8781c80 (diff)
downloadspp-6ad8f811fa7377cee151c407231786a91aebb146.zip
spp-6ad8f811fa7377cee151c407231786a91aebb146.tar.gz
spp-6ad8f811fa7377cee151c407231786a91aebb146.tar.xz
spp_pcap: rename function spp_format_port_stirng
This update is to rename spp_format_port_stirng() which is for getting port type as resource UID to sppwk_port_uid(). Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
-rw-r--r--src/pcap/cmd_runner.c2
-rw-r--r--src/pcap/cmd_utils.c2
-rw-r--r--src/pcap/cmd_utils.h18
3 files changed, 3 insertions, 19 deletions
diff --git a/src/pcap/cmd_runner.c b/src/pcap/cmd_runner.c
index ac5181d..85c02cd 100644
--- a/src/pcap/cmd_runner.c
+++ b/src/pcap/cmd_runner.c
@@ -398,7 +398,7 @@ append_port_entry(char **output, const struct sppwk_port_idx *port,
return SPPWK_RET_NG;
}
- spp_format_port_string(port_str, port->iface_type, port->iface_no);
+ sppwk_port_uid(port_str, port->iface_type, port->iface_no);
ret = append_json_str_value("port", &tmp_buff, port_str);
if (unlikely(ret < SPPWK_RET_OK))
return SPPWK_RET_NG;
diff --git a/src/pcap/cmd_utils.c b/src/pcap/cmd_utils.c
index 3c71b2e..5aa131b 100644
--- a/src/pcap/cmd_utils.c
+++ b/src/pcap/cmd_utils.c
@@ -263,7 +263,7 @@ init_mng_data(void)
* Generate a formatted string of combination from interface type and
* number and assign to given 'port'
*/
-int spp_format_port_string(char *port, enum port_type iface_type, int iface_no)
+int sppwk_port_uid(char *port, enum port_type iface_type, int iface_no)
{
const char *iface_type_str;
diff --git a/src/pcap/cmd_utils.h b/src/pcap/cmd_utils.h
index 2e78c69..95b8a8a 100644
--- a/src/pcap/cmd_utils.h
+++ b/src/pcap/cmd_utils.h
@@ -113,23 +113,7 @@ struct core_info *get_core_info(unsigned int lcore_id);
*/
/* TODO(yasufum) consider to merge to shared. */
int
-spp_format_port_string(char *port, enum port_type iface_type, int iface_no);
-
-/**
- * Port type to string
- *
- * @param port
- * Character string of Port type to be converted.
- * @param iface_type
- * port interface type
- * @param iface_no
- * interface no
- *
- * @retval SPPWK_RET_OK succeeded.
- * @retval SPPWK_RET_NG failed.
- */
-int
-spp_format_port_string(char *port, enum port_type iface_type, int iface_no);
+sppwk_port_uid(char *port, enum port_type iface_type, int iface_no);
/**
* Set mange data address