Index: /branches/rel_apv_10_7/tools/update/ustacksystem.ks
===================================================================
--- /branches/rel_apv_10_7/tools/update/ustacksystem.ks	(revision 38803)
+++ /branches/rel_apv_10_7/tools/update/ustacksystem.ks	(working copy)
@@ -399,6 +399,8 @@
 oracle-instantclient-devel-21.5.0.0.0-1.x86_64
 unbound-libs-1.4.20-26.el7.x86_64
 ldns-1.6.16-7.el7.x86_64
+c-ares-1.33.1-2.el7.x86_64
+c-ares-devel-1.33.1-2.el7.x86_64
 %end
 
 %post --nochroot --interpreter ./tools/image-minimizer
Index: /branches/rel_apv_10_7/tools/ustackbuildenv.ks
===================================================================
--- /branches/rel_apv_10_7/tools/ustackbuildenv.ks	(revision 38803)
+++ /branches/rel_apv_10_7/tools/ustackbuildenv.ks	(working copy)
@@ -473,6 +473,8 @@
 libaio.x86_64
 oracle-instantclient-basic-21.5.0.0.0-1.x86_64
 oracle-instantclient-devel-21.5.0.0.0-1.x86_64
+c-ares-1.33.1-2.el7.x86_64
+c-ares-devel-1.33.1-2.el7.x86_64
 %end
 
 %post
Index: /branches/rel_apv_10_7/usr/click/lib/libdns_agent/Makefile
===================================================================
--- /branches/rel_apv_10_7/usr/click/lib/libdns_agent/Makefile	(revision 38803)
+++ /branches/rel_apv_10_7/usr/click/lib/libdns_agent/Makefile	(working copy)
@@ -34,7 +34,7 @@
 	  -L${.OBJDIR}/../libhttp_utils -lhttp_utils \
 	  -L${.OBJDIR}/../libfastlog -lfastlog \
 	  -L${.OBJDIR}/../libenglog -lenglog \
-	  -lcrypt -lanl -lm -lz
+	  -lcrypt -lanl -lcares -lm -lz
 
 .if defined(USTACK)
 .include <bsd.lib.mk>
Index: /branches/rel_apv_10_7/usr/click/lib/libdns_agent/dns_daemon.c
===================================================================
--- /branches/rel_apv_10_7/usr/click/lib/libdns_agent/dns_daemon.c	(revision 38803)
+++ /branches/rel_apv_10_7/usr/click/lib/libdns_agent/dns_daemon.c	(working copy)
@@ -25,6 +25,7 @@
 #include "amp_ulog.h"
 #include <fastlog.h>
 #include <click/app/proxy/proxy_lib_hash.h>
+#include <ares.h>
 
 #define NAMESERVER_UPDATE_INTERVAL 30 /* second */
 #define DNS_AGENT_SLEEP_TIME    1000  /* microsecond */
@@ -50,9 +51,10 @@
 	webagent_dns_data_t *webagent_ctx;
 	struct gaicb *req[1];
 	struct gaicb req_item;
+	uint32_t ttl;
 };
 #define DNS_REQ_LIST_LEN 20
-#define DEFAULT_WEBAGENT_DNS_TTL 1 
+#define DEFAULT_WEBAGENT_DNS_TTL 1
 
 static __thread struct dns_req_ctx dns_req_wait_list[DNS_REQ_LIST_LEN];
 __thread int outstanding_dns_req_cnt = 0;
@@ -414,11 +416,34 @@
 	return;
 }
 
+/* c-ares ares_getaddrinfo() callback function */
+static void 
+addrinfo_cb(void *arg, int status, int timeouts, struct ares_addrinfo *result)
+{
+	uint32_t *ttl = (uint32_t *)arg;
+	
+	// fastlog_syslog(LOG_DEBUG,"%s: Result: %s, timeouts: %d", __FUNCTION__ ares_strerror(status), timeouts);
+	if (result) {
+		struct ares_addrinfo_node *node = result->nodes;
+		*ttl = node->ai_ttl;
+	}
+	else{
+		fastlog_syslog(LOG_DEBUG, "%s: no result from ares_getaddrinfo()", __FUNCTION__);
+	}
+	ares_freeaddrinfo(result);
+}
+
 static int
 domain_resolve_asynch(char *host, webagent_dns_data_t *dns_data_p)
 {
 	int free_idx = 0;
 	int ret;
+	ares_channel_t *channel = NULL;
+	struct ares_options options;
+	int	optmask = 0;
+	struct ares_addrinfo_hints hints;
+	uint32_t ttl = 0;
+	int timeout_ms = 1000;
 
 	/* find first free slot and Queue nreqs_base..nreqs requests. */
 	while (free_idx < DNS_REQ_LIST_LEN) {
@@ -448,6 +473,30 @@
 	/* dns req successfully sent */
 	dns_req_wait_list[free_idx].webagent_ctx = dns_data_p;
 	dns_req_wait_list[free_idx].busy_fl = 1;
+
+	/* libcares method to get ttl and assign to dns_req_wait_list[].ttl */
+	ares_library_init(ARES_LIB_INIT_ALL);
+
+	memset(&options, 0, sizeof(options));
+  	optmask      |= ARES_OPT_EVENT_THREAD;
+	options.evsys = ARES_EVSYS_DEFAULT;
+
+	if (ares_init_options(&channel, &options, optmask) != ARES_SUCCESS) {
+		fastlog_syslog(LOG_DEBUG, "c-ares initialization issue");
+		return -3;
+	}
+		
+	memset(&hints, 0, sizeof(hints));
+	hints.ai_family = AF_UNSPEC;
+	hints.ai_flags  = ARES_AI_CANONNAME;
+	ares_getaddrinfo(channel, host, NULL, &hints, addrinfo_cb, &ttl);
+
+	ares_queue_wait_empty(channel, timeout_ms);	/* if empty or timeout in timeout_ms millisecond */
+	ares_destroy(channel);
+	ares_library_cleanup();
+
+	dns_req_wait_list[free_idx].ttl = ttl;
+
 	outstanding_dns_req_cnt++;
 	//fastlog_syslog(LOG_DEBUG, "%s: sent req for %s(idx %d), out reqs %d",
 	//	       __FUNCTION__, host, free_idx, outstanding_dns_req_cnt);
@@ -459,6 +508,7 @@
 {
 	poll_item->webagent_ctx = NULL;
 	poll_item->busy_fl = 0;
+	poll_item->ttl = 0;
 	outstanding_dns_req_cnt--;
 }
 
@@ -482,7 +532,6 @@
 			continue;
 		}
 		webagent_ctx = dns_req_wait_list[i].webagent_ctx;
-
 		if (ret == 0) {
 			/* ready */
 			res = req_p->ar_result;
@@ -491,13 +540,23 @@
 				fastlog_syslog(LOG_DEBUG, "%s: [%d], outstanding req %d, thread id %d: host %s -> ip %s",
 					       __FUNCTION__, i, outstanding_dns_req_cnt, webagent_ctx->thread_id,
 					       webagent_ctx->host, inet_ntoa(my_addr->sin_addr));
-
-				webagent_ctx->iptable.ip4_dns_record_table[0].ip = my_addr->sin_addr.s_addr;
-                                webagent_ctx->iptable.ip4_dns_record_table[0].ttl = DEFAULT_WEBAGENT_DNS_TTL;
+				
+                                webagent_ctx->iptable.ip4_dns_record_table[0].ip = my_addr->sin_addr.s_addr;
+				if (dns_req_wait_list[i].ttl){		/* check if ttl is valid */
+					webagent_ctx->iptable.ip4_dns_record_table[0].ttl = dns_req_wait_list[i].ttl;
+				}else{
+					fastlog_syslog(LOG_DEBUG, "Writing default value = %d to ttl", DEFAULT_WEBAGENT_DNS_TTL);
+					webagent_ctx->iptable.ip4_dns_record_table[0].ttl = DEFAULT_WEBAGENT_DNS_TTL;
+				}
 			} else {
 				struct sockaddr_in6 *my_addr = (struct sockaddr_in6 *)res->ai_addr;
 				webagent_ctx->iptable.ip6_dns_record_table[0].ip = my_addr->sin6_addr;
-                                webagent_ctx->iptable.ip6_dns_record_table[0].ttl = DEFAULT_WEBAGENT_DNS_TTL;
+				if (dns_req_wait_list[i].ttl){
+					webagent_ctx->iptable.ip6_dns_record_table[0].ttl = dns_req_wait_list[i].ttl;
+				}else{
+					fastlog_syslog(LOG_DEBUG, "Writing default value = %d to ttl", DEFAULT_WEBAGENT_DNS_TTL);
+					webagent_ctx->iptable.ip6_dns_record_table[0].ttl = DEFAULT_WEBAGENT_DNS_TTL;
+				}
 			}
 			webagent_ctx->ip_num = 1;
 		} else {
Index: /branches/rel_apv_10_7/usr/click/lib/libuinet-atcp/bin/atcp/Makefile
===================================================================
--- /branches/rel_apv_10_7/usr/click/lib/libuinet-atcp/bin/atcp/Makefile	(revision 38803)
+++ /branches/rel_apv_10_7/usr/click/lib/libuinet-atcp/bin/atcp/Makefile	(working copy)
@@ -1,163 +1,163 @@
-TOPDIR?=${CURDIR}/../..
-include ${TOPDIR}/cflags.mk
-
-PROG=atcp
-SRCS=atcp.c
-SRCS+=minidump.cc
-
-UINET_LIBS=uinet
-
-CFLAGS= -g
-CXXFLAGS= -std=c++11 -I${TOPDIR}/../libbreakpad/build/src
-LIBBREAKPAD_CLIENT=${TOPDIR}/../libbreakpad/build/src/client/linux/libbreakpad_client.a
-ifneq ($(ARM64), yes)
-LDADD= -L${UINET_DESTDIR}/lib/ -lanl -lm -lpcap \
-	-L${RTE_SDK}/${RTE_TARGET}/lib -ldpdk \
-	-Wl,--start-group \
-	-L${TOPDIR}/../libenv -lenv \
-	-L${TOPDIR}/../../imgopt_lib -ljpeg \
-	-L${TOPDIR}/../../libpng_lib -lpng \
-	-L${TOPDIR}/../../webp_lib -lwebp -lwebpdemux -lwebpmux -limagedec -limageenc -limageio_util\
-	-L${TOPDIR}/../libuproxy -luproxy \
-	-L${TOPDIR}/../libdriver -ldriver \
-	-L${TOPDIR}/../libamp_hash -lamp_hash \
-	-L${TOPDIR}/../libuserslb -luserslb \
-	-L${TOPDIR}/../libaes_util -laes_util \
-	-L${TOPDIR}/../libhttp_proxy -lhttp_proxy \
-	-L${TOPDIR}/../libhttp2 -lhttp2 \
-	-L${TOPDIR}/../libuserddos -luserddos \
-	-L${TOPDIR}/../libcache -lcache \
-	-L${TOPDIR}/../libwebagent -lwebagent \
-	-L${TOPDIR}/../libdns_agent -ldns_agent \
-	-L${TOPDIR}/../libdpi -ldpi \
-	-L${TOPDIR}/../libndpi/lib -lndpi \
-	-L${TOPDIR}/../libdiameter_proxy -ldiameter_proxy \
-	-L${TOPDIR}/../libepolicy -lepolicy \
-	-L${TOPDIR}/../libngx_parser -lngx_parser \
-	-L${TOPDIR}/../libeproxy -leproxy \
-	-L${TOPDIR}/../libarray_parsers_http -larray_parsers_http \
-	-L${TOPDIR}/../libpatricia -lpatricia \
-	-L${TOPDIR}/../libutube -lutube \
-	-L${TOPDIR}/../libhttp_utils -lhttp_utils \
-	-L${TOPDIR}/../libenglog -lenglog \
-	-L${TOPDIR}/../libmpool -lmpool \
-	-L${TOPDIR}/../libamp_ulog -lamp_ulog \
-	-L${TOPDIR}/../libhash -lhash \
-	-L${TOPDIR}/../libsdf -lsdf \
-	-L${TOPDIR}/../libssl_guoxin/uos_x86 -lsdf_crypto -lskf \
-	-L${TOPDIR}/../libssl_cli -lssl_cli \
-	-L${TOPDIR}/../libregexperl -lregexperl \
-	-L${TOPDIR}/../libsmanager -lsmanager \
-	-L${TOPDIR}/../liban_ipc -lan_ipc \
-	-L${TOPDIR}/../libsessmgr_api -lsessmgr_api \
-	-L${TOPDIR}/../libbsd -lbsd \
-	-L${TOPDIR}/../libssl_proxy -lssl_app \
-	-L${TOPDIR}/../libcrypto_app -lcrypto_app \
-	-L${TOPDIR}/../libopenssl-1.1.1 -lcrypto-tls13 \
-	-L${TOPDIR}/../libssl_crypto_common -lssl_crypto_common \
-	-L${TOPDIR}/../libssl_utils -lssl_utils \
-	-L${TOPDIR}/../libqat_common_api -lqat_common_api \
-	-L${TOPDIR}/../libqat_cy_api -lqat_cy_api \
-	-L${TOPDIR}/../libipp -lippcp \
-	-L${TOPDIR}/../libipp -lippcore \
-	-L${TOPDIR}/../libproxy_shared_cli -lproxy_shared_cli \
-	-L${TOPDIR}/../libfeactl -lfeactl \
-	-L${TOPDIR}/../libexception -lexception \
-	-L${TOPDIR}/../librax -lrax \
-	-L${TOPDIR}/../libcautil -lcautil -lutil \
-	${TOPDIR}/../libuinet-atcp/lib/libuinet/libuinet.a \
-	${LIBBREAKPAD_CLIENT} \
-	-Wl,--end-group \
-	-lrt \
-	-lnfnetlink \
-	-lnetfilter_conntrack \
-	-lpthread \
-	-ldl \
-	-lcrypt \
-	-lstdc++ \
-	-lz \
-	-ludev \
-	-lpciaccess ${TOPDIR}/lib/libev/.libs/libev.a
-else
-LDADD= -L${UINET_DESTDIR}/lib/ -lanl -lm -lpcap \
-	-L${RTE_SDK}/${RTE_TARGET}/lib -ldpdk \
-	-Wl,--start-group \
-	-L${TOPDIR}/../libenv -lenv \
-	-L${TOPDIR}/../../imgopt_lib -ljpeg \
-	-L${TOPDIR}/../../libpng_lib -lpng \
-	-L${TOPDIR}/../../webp_lib -lwebp -lwebpdemux -lwebpmux -limagedec -limageenc -limageio_util\
-	-L${TOPDIR}/../libuproxy -luproxy \
-	-L${TOPDIR}/../libdriver -ldriver \
-	-L${TOPDIR}/../libamp_hash -lamp_hash \
-	-L${TOPDIR}/../libuserslb -luserslb \
-	-L${TOPDIR}/../libaes_util -laes_util \
-	-L${TOPDIR}/../libhttp_proxy -lhttp_proxy \
-	-L${TOPDIR}/../libhttp2 -lhttp2 \
-	-L${TOPDIR}/../libuserddos -luserddos \
-	-L${TOPDIR}/../libcache -lcache \
-	-L${TOPDIR}/../libwebagent -lwebagent \
-	-L${TOPDIR}/../libdns_agent -ldns_agent \
-	-L${TOPDIR}/../libdpi -ldpi \
-	-L${TOPDIR}/../libndpi/lib -lndpi \
-	-L${TOPDIR}/../libdiameter_proxy -ldiameter_proxy \
-	-L${TOPDIR}/../libepolicy -lepolicy \
-	-L${TOPDIR}/../libngx_parser -lngx_parser \
-	-L${TOPDIR}/../libeproxy -leproxy \
-	-L${TOPDIR}/../libarray_parsers_http -larray_parsers_http \
-	-L${TOPDIR}/../libpatricia -lpatricia \
-	-L${TOPDIR}/../libutube -lutube \
-	-L${TOPDIR}/../libhttp_utils -lhttp_utils \
-	-L${TOPDIR}/../libenglog -lenglog \
-	-L${TOPDIR}/../libmpool -lmpool \
-	-L${TOPDIR}/../libamp_ulog -lamp_ulog \
-	-L${TOPDIR}/../libhash -lhash \
-	-L${TOPDIR}/../libsdf -lsdf_arm \
-	-L${TOPDIR}/../libssl_guoxin/kylinv10_arm -lsdf_crypto -lskf \
-	-L${TOPDIR}/../libssl_cli -lssl_cli \
-	-L${TOPDIR}/../libregexperl -lregexperl \
-	-L${TOPDIR}/../libsmanager -lsmanager \
-	-L${TOPDIR}/../liban_ipc -lan_ipc \
-	-L${TOPDIR}/../libsessmgr_api -lsessmgr_api \
-	-lbsd \
-	-L${TOPDIR}/../libssl_proxy -lssl_app \
-	-L${TOPDIR}/../libcrypto_app -lcrypto_app \
-	-L${TOPDIR}/../libopenssl-1.1.1 -lcrypto-tls13 \
-	-L${TOPDIR}/../libssl_crypto_common -lssl_crypto_common \
-	-L${TOPDIR}/../libssl_utils -lssl_utils \
-	-L${TOPDIR}/../libproxy_shared_cli -lproxy_shared_cli \
-	-L${TOPDIR}/../libfeactl -lfeactl \
-	-L${TOPDIR}/../libexception -lexception \
-	-L${TOPDIR}/../librax -lrax \
-	-L${TOPDIR}/../libcautil -lcautil -lutil \
-	${TOPDIR}/../libuinet-atcp/lib/libuinet/libuinet.a \
-	${LIBBREAKPAD_CLIENT} \
-	-Wl,--end-group \
-	-lrt \
-	-lnfnetlink \
-	-lnetfilter_conntrack \
-	-lpthread \
-	-ldl \
-	-lcrypt \
-	-lstdc++ \
-	-lz \
-	-lpciaccess ${TOPDIR}/lib/libev/.libs/libev.a
-endif
-
-include ${TOPDIR}/mk/prog.mk
-ifeq (${UOS_X86}, yes)
-LDADD += -ltcl -lexpat -L${TOPDIR}/../libqat/qat/build -lqat  
-else
-
-ifeq ($(KYLIN), yes)
-LDADD += -ltcl -lexpat 
-else
-
-ifneq ($(ARM64), yes)
-LDADD += /usr/local/lib64/libtcl8.6.so /usr/lib64/libexpat.so -L${TOPDIR}/../libqat/qat/build -lqat
-else
-LDADD += /usr/lib64/libtcl8.5.so /usr/lib64/libexpat.so
-endif
-
-endif
-
-endif
+TOPDIR?=${CURDIR}/../..
+include ${TOPDIR}/cflags.mk
+
+PROG=atcp
+SRCS=atcp.c
+SRCS+=minidump.cc
+
+UINET_LIBS=uinet
+
+CFLAGS= -g
+CXXFLAGS= -std=c++11 -I${TOPDIR}/../libbreakpad/build/src
+LIBBREAKPAD_CLIENT=${TOPDIR}/../libbreakpad/build/src/client/linux/libbreakpad_client.a
+ifneq ($(ARM64), yes)
+LDADD= -L${UINET_DESTDIR}/lib/ -lanl -lcares -lm -lpcap \
+	-L${RTE_SDK}/${RTE_TARGET}/lib -ldpdk \
+	-Wl,--start-group \
+	-L${TOPDIR}/../libenv -lenv \
+	-L${TOPDIR}/../../imgopt_lib -ljpeg \
+	-L${TOPDIR}/../../libpng_lib -lpng \
+	-L${TOPDIR}/../../webp_lib -lwebp -lwebpdemux -lwebpmux -limagedec -limageenc -limageio_util\
+	-L${TOPDIR}/../libuproxy -luproxy \
+	-L${TOPDIR}/../libdriver -ldriver \
+	-L${TOPDIR}/../libamp_hash -lamp_hash \
+	-L${TOPDIR}/../libuserslb -luserslb \
+	-L${TOPDIR}/../libaes_util -laes_util \
+	-L${TOPDIR}/../libhttp_proxy -lhttp_proxy \
+	-L${TOPDIR}/../libhttp2 -lhttp2 \
+	-L${TOPDIR}/../libuserddos -luserddos \
+	-L${TOPDIR}/../libcache -lcache \
+	-L${TOPDIR}/../libwebagent -lwebagent \
+	-L${TOPDIR}/../libdns_agent -ldns_agent \
+	-L${TOPDIR}/../libdpi -ldpi \
+	-L${TOPDIR}/../libndpi/lib -lndpi \
+	-L${TOPDIR}/../libdiameter_proxy -ldiameter_proxy \
+	-L${TOPDIR}/../libepolicy -lepolicy \
+	-L${TOPDIR}/../libngx_parser -lngx_parser \
+	-L${TOPDIR}/../libeproxy -leproxy \
+	-L${TOPDIR}/../libarray_parsers_http -larray_parsers_http \
+	-L${TOPDIR}/../libpatricia -lpatricia \
+	-L${TOPDIR}/../libutube -lutube \
+	-L${TOPDIR}/../libhttp_utils -lhttp_utils \
+	-L${TOPDIR}/../libenglog -lenglog \
+	-L${TOPDIR}/../libmpool -lmpool \
+	-L${TOPDIR}/../libamp_ulog -lamp_ulog \
+	-L${TOPDIR}/../libhash -lhash \
+	-L${TOPDIR}/../libsdf -lsdf \
+	-L${TOPDIR}/../libssl_guoxin/uos_x86 -lsdf_crypto -lskf \
+	-L${TOPDIR}/../libssl_cli -lssl_cli \
+	-L${TOPDIR}/../libregexperl -lregexperl \
+	-L${TOPDIR}/../libsmanager -lsmanager \
+	-L${TOPDIR}/../liban_ipc -lan_ipc \
+	-L${TOPDIR}/../libsessmgr_api -lsessmgr_api \
+	-L${TOPDIR}/../libbsd -lbsd \
+	-L${TOPDIR}/../libssl_proxy -lssl_app \
+	-L${TOPDIR}/../libcrypto_app -lcrypto_app \
+	-L${TOPDIR}/../libopenssl-1.1.1 -lcrypto-tls13 \
+	-L${TOPDIR}/../libssl_crypto_common -lssl_crypto_common \
+	-L${TOPDIR}/../libssl_utils -lssl_utils \
+	-L${TOPDIR}/../libqat_common_api -lqat_common_api \
+	-L${TOPDIR}/../libqat_cy_api -lqat_cy_api \
+	-L${TOPDIR}/../libipp -lippcp \
+	-L${TOPDIR}/../libipp -lippcore \
+	-L${TOPDIR}/../libproxy_shared_cli -lproxy_shared_cli \
+	-L${TOPDIR}/../libfeactl -lfeactl \
+	-L${TOPDIR}/../libexception -lexception \
+	-L${TOPDIR}/../librax -lrax \
+	-L${TOPDIR}/../libcautil -lcautil -lutil \
+	${TOPDIR}/../libuinet-atcp/lib/libuinet/libuinet.a \
+	${LIBBREAKPAD_CLIENT} \
+	-Wl,--end-group \
+	-lrt \
+	-lnfnetlink \
+	-lnetfilter_conntrack \
+	-lpthread \
+	-ldl \
+	-lcrypt \
+	-lstdc++ \
+	-lz \
+	-ludev \
+	-lpciaccess ${TOPDIR}/lib/libev/.libs/libev.a
+else
+LDADD= -L${UINET_DESTDIR}/lib/ -lanl -lcares -lm -lpcap \
+	-L${RTE_SDK}/${RTE_TARGET}/lib -ldpdk \
+	-Wl,--start-group \
+	-L${TOPDIR}/../libenv -lenv \
+	-L${TOPDIR}/../../imgopt_lib -ljpeg \
+	-L${TOPDIR}/../../libpng_lib -lpng \
+	-L${TOPDIR}/../../webp_lib -lwebp -lwebpdemux -lwebpmux -limagedec -limageenc -limageio_util\
+	-L${TOPDIR}/../libuproxy -luproxy \
+	-L${TOPDIR}/../libdriver -ldriver \
+	-L${TOPDIR}/../libamp_hash -lamp_hash \
+	-L${TOPDIR}/../libuserslb -luserslb \
+	-L${TOPDIR}/../libaes_util -laes_util \
+	-L${TOPDIR}/../libhttp_proxy -lhttp_proxy \
+	-L${TOPDIR}/../libhttp2 -lhttp2 \
+	-L${TOPDIR}/../libuserddos -luserddos \
+	-L${TOPDIR}/../libcache -lcache \
+	-L${TOPDIR}/../libwebagent -lwebagent \
+	-L${TOPDIR}/../libdns_agent -ldns_agent \
+	-L${TOPDIR}/../libdpi -ldpi \
+	-L${TOPDIR}/../libndpi/lib -lndpi \
+	-L${TOPDIR}/../libdiameter_proxy -ldiameter_proxy \
+	-L${TOPDIR}/../libepolicy -lepolicy \
+	-L${TOPDIR}/../libngx_parser -lngx_parser \
+	-L${TOPDIR}/../libeproxy -leproxy \
+	-L${TOPDIR}/../libarray_parsers_http -larray_parsers_http \
+	-L${TOPDIR}/../libpatricia -lpatricia \
+	-L${TOPDIR}/../libutube -lutube \
+	-L${TOPDIR}/../libhttp_utils -lhttp_utils \
+	-L${TOPDIR}/../libenglog -lenglog \
+	-L${TOPDIR}/../libmpool -lmpool \
+	-L${TOPDIR}/../libamp_ulog -lamp_ulog \
+	-L${TOPDIR}/../libhash -lhash \
+	-L${TOPDIR}/../libsdf -lsdf_arm \
+	-L${TOPDIR}/../libssl_guoxin/kylinv10_arm -lsdf_crypto -lskf \
+	-L${TOPDIR}/../libssl_cli -lssl_cli \
+	-L${TOPDIR}/../libregexperl -lregexperl \
+	-L${TOPDIR}/../libsmanager -lsmanager \
+	-L${TOPDIR}/../liban_ipc -lan_ipc \
+	-L${TOPDIR}/../libsessmgr_api -lsessmgr_api \
+	-lbsd \
+	-L${TOPDIR}/../libssl_proxy -lssl_app \
+	-L${TOPDIR}/../libcrypto_app -lcrypto_app \
+	-L${TOPDIR}/../libopenssl-1.1.1 -lcrypto-tls13 \
+	-L${TOPDIR}/../libssl_crypto_common -lssl_crypto_common \
+	-L${TOPDIR}/../libssl_utils -lssl_utils \
+	-L${TOPDIR}/../libproxy_shared_cli -lproxy_shared_cli \
+	-L${TOPDIR}/../libfeactl -lfeactl \
+	-L${TOPDIR}/../libexception -lexception \
+	-L${TOPDIR}/../librax -lrax \
+	-L${TOPDIR}/../libcautil -lcautil -lutil \
+	${TOPDIR}/../libuinet-atcp/lib/libuinet/libuinet.a \
+	${LIBBREAKPAD_CLIENT} \
+	-Wl,--end-group \
+	-lrt \
+	-lnfnetlink \
+	-lnetfilter_conntrack \
+	-lpthread \
+	-ldl \
+	-lcrypt \
+	-lstdc++ \
+	-lz \
+	-lpciaccess ${TOPDIR}/lib/libev/.libs/libev.a
+endif
+
+include ${TOPDIR}/mk/prog.mk
+ifeq (${UOS_X86}, yes)
+LDADD += -ltcl -lexpat -L${TOPDIR}/../libqat/qat/build -lqat  
+else
+
+ifeq ($(KYLIN), yes)
+LDADD += -ltcl -lexpat 
+else
+
+ifneq ($(ARM64), yes)
+LDADD += /usr/local/lib64/libtcl8.6.so /usr/lib64/libexpat.so -L${TOPDIR}/../libqat/qat/build -lqat
+else
+LDADD += /usr/lib64/libtcl8.5.so /usr/lib64/libexpat.so
+endif
+
+endif
+
+endif
