Update comm_common.cpp

This commit is contained in:
Eao3piq4e 2022-08-05 11:49:40 +08:00
parent 8902cfd59a
commit 3c1a1c2bef
1 changed files with 18 additions and 2 deletions

View File

@ -285,7 +285,7 @@ description: The function check if the process currently working has loaded tran
arguments: void
return value: 0 or 1, if 1, then at least one loaded transcation exists, if 0, no one.
note: none
date: 2022/8/4
date: 2022/8/5
contact: 18720816902
*/
int CommCheckLtranProcess()
@ -417,7 +417,7 @@ arguments: The first argument is a pointer of type const char* to a string that
from string str_attr, we can use these ids to bind specific CPU.
return value: void
note: none
date: 2022/8/4
date: 2022/8/5
contact: 18720816902
*/
static void ParseCommProxyNumaBind(
@ -520,6 +520,22 @@ bool ParseCommProxyAttr(CommProxyConfig* config)
return true;
}
/*
function name: CommCheckFilterMatch
description: This function compare the ip and port allowed with ip and port gotten from
Filter, if they are correspondingly same, it will return true value.
arguments: The first argument is a pointer of type const char* to a string that indicating
the id and port of the request been sent to Filter, the id and port have been
separated by character ':'.
The second argument is an integer telling us we the length of the string first
argument directs.
The third argument tells us the ip allowed.
The fourth argument tells us the port allowed.
return value: static bool
note: none
date: 2022/8/4
contact: 18720816902
*/
static bool CommCheckFilterMatch(const char *filter, int len, const char *ip, int port)
{
char *str_ip = NULL;