1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17#ifndef ROCKER_FP_H
18#define ROCKER_FP_H
19
20#include "net/net.h"
21#include "qemu/iov.h"
22
23#define ROCKER_FP_PORTS_MAX 62
24
25typedef struct fp_port FpPort;
26
27int fp_port_eg(FpPort *port, const struct iovec *iov, int iovcnt);
28
29char *fp_port_get_name(FpPort *port);
30bool fp_port_get_link_up(FpPort *port);
31RockerPort *fp_port_get_info(FpPort *port);
32void fp_port_get_macaddr(FpPort *port, MACAddr *macaddr);
33void fp_port_set_macaddr(FpPort *port, MACAddr *macaddr);
34uint8_t fp_port_get_learning(FpPort *port);
35void fp_port_set_learning(FpPort *port, uint8_t learning);
36int fp_port_get_settings(FpPort *port, uint32_t *speed,
37 uint8_t *duplex, uint8_t *autoneg);
38int fp_port_set_settings(FpPort *port, uint32_t speed,
39 uint8_t duplex, uint8_t autoneg);
40bool fp_port_from_pport(uint32_t pport, uint32_t *port);
41World *fp_port_get_world(FpPort *port);
42void fp_port_set_world(FpPort *port, World *world);
43bool fp_port_check_world(FpPort *port, World *world);
44bool fp_port_enabled(FpPort *port);
45void fp_port_enable(FpPort *port);
46void fp_port_disable(FpPort *port);
47
48FpPort *fp_port_alloc(Rocker *r, char *sw_name,
49 MACAddr *start_mac, unsigned int index,
50 NICPeers *peers);
51void fp_port_free(FpPort *port);
52void fp_port_reset(FpPort *port);
53
54#endif
55