sandbox: eth: Add a bridge to a real network for sandbox
[oweals/u-boot.git] / arch / sandbox / include / asm / eth-raw-os.h
1 /*
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  */
19 struct eth_sandbox_raw_priv {
20         int sd;
21         void *device;
22 };
23
24 int sandbox_eth_raw_os_start(const char *ifname, unsigned char *ethmac,
25                             struct eth_sandbox_raw_priv *priv);
26 int sandbox_eth_raw_os_send(void *packet, int length,
27                             const struct eth_sandbox_raw_priv *priv);
28 int sandbox_eth_raw_os_recv(void *packet, int *length,
29                             const struct eth_sandbox_raw_priv *priv);
30 void sandbox_eth_raw_os_stop(struct eth_sandbox_raw_priv *priv);
31
32 #endif /* __ETH_RAW_OS_H */