4 * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
21 * @file specific-trace.c
23 * @desc functions for tracing complex entities
25 * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
29 #include <sys/socket.h>
30 #include <netinet/in.h>
31 #include <arpa/inet.h>
33 #include "specific-trace.h"
37 gboolean print_appstat(gpointer key, gpointer value,
38 void __attribute__((__unused__)) *data)
40 struct application_stat *appstat = (struct application_stat *)value;
41 struct classid_iftype_key *composite_key =
42 (struct classid_iftype_key *)key;
44 if (!appstat || !composite_key) {
45 _E("Please provide valid argument for printing app stat\n");
46 return TRUE; /*stop printing*/
49 _SD("appid %s, pid %d, rcv %u, snd %u, classid %u, iftype %d, ifname %s," \
51 appstat->application_id, appstat->pid, appstat->rcv_count,
52 appstat->snd_count, (u_int32_t)composite_key->classid,
53 composite_key->iftype, composite_key->ifname,