TFTP
Change tests from a copy to using the original with mocs
This commit is contained in:
37
tests/tftp_server.h
Normal file
37
tests/tftp_server.h
Normal file
@@ -0,0 +1,37 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
|
||||
struct pbuf {
|
||||
struct pbuf *next;
|
||||
void *payload;
|
||||
uint16_t tot_len;
|
||||
uint16_t len;
|
||||
uint8_t type_internal;
|
||||
uint8_t flags;
|
||||
//LWIP_PBUF_REF_T ref;
|
||||
|
||||
uint8_t if_idx;
|
||||
};
|
||||
|
||||
#define ERR_OK 0
|
||||
|
||||
struct tftp_context {
|
||||
void* (*open)(const char* fname, const char* mode, uint8_t write);
|
||||
void (*close)(void* handle);
|
||||
int (*read)(void* handle, void* buf, int bytes);
|
||||
int (*write)(void* handle, struct pbuf* p);
|
||||
};
|
||||
|
||||
void tftp_cleanup(void);
|
||||
uint32_t logger_get_timestamp(void);
|
||||
int tftp_init(struct tftp_context* context);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user