blob: df60c4f3b8ced2aeadc325422b1477cbef8c6631 [file] [log] [blame]
Joe Hershberger586cbd12015-03-22 17:09:21 -05001/*
2 * Copyright (c) 2015 National Instruments
3 *
4 * (C) Copyright 2015
5 * Joe Hershberger <joe.hershberger@ni.com>
6 *
7 * SPDX-License-Identifier: GPL-2.0
8 */
9
10#ifndef __ETH_RAW_OS_H
11#define __ETH_RAW_OS_H
12
13/**
14 * struct eth_sandbox_raw_priv - raw socket session
15 *
16 * sd: socket descriptor - the open socket during a session
17 * device: struct sockaddr_ll - the host interface packets move to/from
18 */
19struct eth_sandbox_raw_priv {
20 int sd;
21 void *device;
22};
23
24int sandbox_eth_raw_os_start(const char *ifname, unsigned char *ethmac,
25 struct eth_sandbox_raw_priv *priv);
26int sandbox_eth_raw_os_send(void *packet, int length,
27 const struct eth_sandbox_raw_priv *priv);
28int sandbox_eth_raw_os_recv(void *packet, int *length,
29 const struct eth_sandbox_raw_priv *priv);
30void sandbox_eth_raw_os_stop(struct eth_sandbox_raw_priv *priv);
31
32#endif /* __ETH_RAW_OS_H */