/src/mongoose/test/driver_mock.c
Line | Count | Source |
1 | 4.74k | static bool mock_init(struct mg_tcpip_if *ifp) { |
2 | 4.74k | (void) ifp; |
3 | 4.74k | return true; |
4 | 4.74k | } |
5 | | |
6 | 9.55k | static size_t mock_tx(const void *buf, size_t len, struct mg_tcpip_if *ifp) { |
7 | 9.55k | (void) buf, (void) len, (void) ifp; |
8 | 9.55k | return len; |
9 | 9.55k | } |
10 | | |
11 | 4.74k | static size_t mock_rx(void *buf, size_t len, struct mg_tcpip_if *ifp) { |
12 | 4.74k | (void) buf, (void) len, (void) ifp; |
13 | 4.74k | return 0; |
14 | 4.74k | } |
15 | | |
16 | 4.74k | static bool mock_up(struct mg_tcpip_if *ifp) { |
17 | 4.74k | (void) ifp; |
18 | 4.74k | return true; |
19 | 4.74k | } |
20 | | |
21 | | struct mg_tcpip_driver mg_tcpip_driver_mock = {mock_init, mock_tx, mock_rx, mock_up}; |