2 * Copyright 2008 Michael Bernhard
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
34 #include <epan/packet_info.h>
36 #include <epan/stat_cmd_args.h>
37 #include <epan/nstime.h>
38 #include <epan/dissectors/packet-sv.h>
41 sv_packet(void *prs _U_, packet_info *pinfo, epan_dissect_t *edt _U_, const void *pri)
44 const sv_frame_data * sv_data = pri;
46 printf("%f %u ", nstime_to_sec(&pinfo->fd->rel_ts), sv_data->smpCnt);
48 for(i = 0; i < sv_data->num_phsMeas; i++) {
49 printf("%d ", sv_data->phsMeas[i].value);
58 svstat_init(const char *optarg _U_, void* userdata _U_)
60 GString *error_string;
62 error_string = register_tap_listener(
71 /* error, we failed to attach to the tap. clean up */
72 fprintf(stderr, "tshark: Couldn't register sv,stat tap: %s\n",
74 g_string_free(error_string, TRUE);
80 register_tap_listener_sv(void)
82 register_stat_cmd_arg("sv", svstat_init, NULL);