mirror of
https://github.com/cesanta/mongoose.git
synced 2024-11-28 05:39:00 +08:00
commit
da303b8b4f
@ -22,7 +22,7 @@ void setup() {
|
||||
delay(3000);
|
||||
MG_INFO(("Starting TCP/IP stack..."));
|
||||
|
||||
struct mip_if mif = {.mac = {0, 0, 1, 2, 3, 5}};
|
||||
struct mip_if mif = {.mac = {2, 0, 1, 2, 3, 5}};
|
||||
mif.use_dhcp = true;
|
||||
mif.driver = &mip_driver_w5500;
|
||||
mif.driver_data = &spi;
|
||||
|
@ -44,7 +44,7 @@ static size_t pcap_rx(void *buf, size_t len, void *userdata) {
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
const char *iface = "lo0"; // Network iface
|
||||
const char *mac = "00:00:01:02:03:77"; // MAC address
|
||||
const char *mac = "02:00:01:02:03:77"; // MAC address
|
||||
const char *bpf = NULL; // "host x.x.x.x or ether host ff:ff:ff:ff:ff:ff";
|
||||
char errbuf[PCAP_ERRBUF_SIZE] = "";
|
||||
|
||||
|
@ -35,7 +35,7 @@ static size_t tap_rx(void *buf, size_t len, void *userdata) {
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
const char *iface = "tap0"; // Network iface
|
||||
const char *mac = "00:00:01:02:03:77"; // MAC address
|
||||
const char *mac = "02:00:01:02:03:77"; // MAC address
|
||||
|
||||
// Parse options
|
||||
for (int i = 1; i < argc; i++) {
|
||||
|
@ -72,7 +72,7 @@ int main(void) {
|
||||
// For static configuration, specify IP/mask/GW in network byte order
|
||||
struct mip_driver_stm32 driver_data = {.mdc_cr = 4}; // See driver_stm32.h
|
||||
struct mip_if mif = {
|
||||
.mac = {0, 0, 1, 2, 3, 5},
|
||||
.mac = {2, 0, 1, 2, 3, 5},
|
||||
.use_dhcp = true,
|
||||
.driver = &mip_driver_stm32,
|
||||
.driver_data = &driver_data,
|
||||
|
@ -49,7 +49,7 @@ static void server(void *args) {
|
||||
ethernet_init();
|
||||
struct mip_driver_stm32 driver_data = {.mdc_cr = 4}; // See driver_stm32.h
|
||||
struct mip_if mif = {
|
||||
.mac = {0, 0, 1, 2, 3, 5},
|
||||
.mac = {2, 0, 1, 2, 3, 5},
|
||||
.use_dhcp = true,
|
||||
.driver = &mip_driver_stm32,
|
||||
.driver_data = &driver_data,
|
||||
|
@ -72,7 +72,7 @@ int main(void) {
|
||||
// For static configuration, specify IP/mask/GW in network byte order
|
||||
struct mip_driver_stm32 driver_data = {.mdc_cr = 4}; // See driver_stm32.h
|
||||
struct mip_if mif = {
|
||||
.mac = {0, 0, 1, 2, 3, 5},
|
||||
.mac = {2, 0, 1, 2, 3, 5},
|
||||
.use_dhcp = true,
|
||||
.driver = &mip_driver_stm32,
|
||||
.driver_data = &driver_data,
|
||||
|
@ -88,7 +88,7 @@ int main(void) {
|
||||
// For static configuration, specify IP/mask/GW in network byte order
|
||||
struct mip_driver_tm4c driver_data = {.mdc_cr = 1}; // See driver_tm4c.h
|
||||
struct mip_if mif = {
|
||||
.mac = {0, 0, 1, 2, 3, 5},
|
||||
.mac = {2, 0, 1, 2, 3, 5},
|
||||
.use_dhcp = true,
|
||||
.driver = &mip_driver_tm4c,
|
||||
.driver_data = &driver_data,
|
||||
|
Loading…
Reference in New Issue
Block a user