File: daq_instance_api_defaults.c

package info (click to toggle)
daq 3.0.0-alpha5-1
  • links: PTS
  • area: main
  • in suites: experimental
  • size: 2,712 kB
  • sloc: ansic: 9,302; sh: 4,442; cpp: 495; makefile: 234
file content (115 lines) | stat: -rw-r--r-- 2,756 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
/*
** Copyright (C) 2018-2019 Cisco and/or its affiliates. All rights reserved.
** Author: Michael R. Altizer <mialtize@cisco.com>
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License Version 2 as
** published by the Free Software Foundation.  You may not use, modify or
** distribute this program under any other version of the GNU General
** Public License.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "daq_dlt.h"
#include "daq_instance_api_defaults.h"

int daq_default_set_filter(void *handle, const char *filter)
{
    return DAQ_ERROR_NOTSUP;
}

int daq_default_start(void *handle)
{
    return DAQ_SUCCESS;
}

int daq_default_inject(void *handle, DAQ_MsgType type, const void *hdr, const uint8_t *data, uint32_t data_len)
{
    return DAQ_ERROR_NOTSUP;
}

int daq_default_inject_relative(void *handle, DAQ_Msg_h msg, const uint8_t *data, uint32_t data_len, int reverse)
{
    return DAQ_ERROR_NOTSUP;
}

int daq_default_interrupt(void *handle)
{
    return DAQ_ERROR_NOTSUP;
}

int daq_default_stop(void *handle)
{
    return DAQ_SUCCESS;
}

int daq_default_ioctl(void *handle, DAQ_IoctlCmd cmd, void *arg, size_t arglen)
{
    return DAQ_ERROR_NOTSUP;
}

int daq_default_get_stats(void *handle, DAQ_Stats_t *stats)
{
    return DAQ_ERROR_NOTSUP;
}

void daq_default_reset_stats(void *handle)
{
}

int daq_default_get_snaplen(void *handle)
{
    return -1;
}

uint32_t daq_default_get_capabilities(void *handle)
{
    return 0;
}

int daq_default_get_datalink_type(void *handle)
{
    return DLT_NULL;
}

int daq_default_config_load(void *handle, void **new_config)
{
    return DAQ_ERROR_NOTSUP;
}

int daq_default_config_swap(void *handle, void *new_config, void **old_config)
{
    return DAQ_ERROR_NOTSUP;
}

int daq_default_config_free(void *handle, void *old_config)
{
    return DAQ_ERROR_NOTSUP;
}

unsigned daq_default_msg_receive(void *handle, const unsigned max_recv, const DAQ_Msg_t *msgs[], DAQ_RecvStatus *rstat)
{
    return DAQ_ERROR_NOTSUP;
}

int daq_default_msg_finalize(void *handle, const DAQ_Msg_t *msg, DAQ_Verdict verdict)
{
    return DAQ_ERROR_NOTSUP;
}

int daq_default_get_msg_pool_info(void *handle, DAQ_MsgPoolInfo_t *info)
{
    return DAQ_ERROR_NOTSUP;
}