network: Added new ability for drivers to provide error information upon failed init. Updated translation strings. Fixed an issue with VDE configuration settings.

This commit is contained in:
cold-brewed
2023-05-23 11:53:59 -04:00
parent 5c26d3d4b3
commit ef34e81cd1
51 changed files with 230 additions and 34 deletions

View File

@@ -163,6 +163,8 @@
# define IDS_DYNAREC IDS_2163
#endif
#define IDS_2166 2166 // "Video card #2 ""%hs"" is not..."
#define IDS_2167 2167 // "Network driver initialization failed"
#define IDS_2168 2168 // "The network configuration will be switched to the null driver"
#define IDS_4096 4096 // "Hard disk (%s)"
#define IDS_4097 4097 // "%01i:%01i"
@@ -271,7 +273,7 @@
#define IDS_LANG_ENUS IDS_7168
#define STR_NUM_2048 118
#define STR_NUM_2048 120
// UNUSED: #define STR_NUM_3072 11
#define STR_NUM_4096 40
#define STR_NUM_4352 6

View File

@@ -64,6 +64,9 @@
#define NET_PERIOD_10M 0.8
#define NET_PERIOD_100M 0.08
/* Error buffers for network driver init */
#define NET_DRV_ERRBUF_SIZE 384
enum {
NET_LINK_DOWN = (1 << 1),
NET_LINK_TEMP_DOWN = (1 << 2),
@@ -118,7 +121,7 @@ typedef struct _netcard_t netcard_t;
typedef struct netdrv_t {
void (*notify_in)(void *priv);
void *(*init)(const netcard_t *card, const uint8_t *mac_addr, void *priv);
void *(*init)(const netcard_t *card, const uint8_t *mac_addr, void *priv, char *netdrv_errbuf);
void (*close)(void *priv);
void *priv;
} netdrv_t;