ETHER: Properly describe const MAC address parameter in eth_mac_fmt
Fix problem reported in #316
This commit is contained in:
parent
253e9deea7
commit
2c16110d94
2 changed files with 4 additions and 4 deletions
|
@ -406,7 +406,7 @@ t_stat eth_mac_scan (ETH_MAC* mac, const char* strmac)
|
||||||
return SCPE_OK;
|
return SCPE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void eth_mac_fmt(const ETH_MAC* mac, char* buff)
|
void eth_mac_fmt(ETH_MAC* const mac, char* buff)
|
||||||
{
|
{
|
||||||
const uint8* m = (const uint8*) mac;
|
const uint8* m = (const uint8*) mac;
|
||||||
sprintf(buff, "%02X:%02X:%02X:%02X:%02X:%02X", m[0], m[1], m[2], m[3], m[4], m[5]);
|
sprintf(buff, "%02X:%02X:%02X:%02X:%02X:%02X", m[0], m[1], m[2], m[3], m[4], m[5]);
|
||||||
|
@ -521,8 +521,8 @@ void eth_packet_trace_ex(ETH_DEV* dev, const uint8 *msg, int len, const char* tx
|
||||||
char dst[20];
|
char dst[20];
|
||||||
const unsigned short* proto = (const unsigned short*) &msg[12];
|
const unsigned short* proto = (const unsigned short*) &msg[12];
|
||||||
uint32 crc = eth_crc32(0, msg, len);
|
uint32 crc = eth_crc32(0, msg, len);
|
||||||
eth_mac_fmt((const ETH_MAC*)msg, dst);
|
eth_mac_fmt((ETH_MAC*)msg, dst);
|
||||||
eth_mac_fmt((const ETH_MAC*)(msg+6), src);
|
eth_mac_fmt((ETH_MAC*)(msg+6), src);
|
||||||
sim_debug(reason, dev->dptr, "%s dst: %s src: %s proto: 0x%04X len: %d crc: %X\n",
|
sim_debug(reason, dev->dptr, "%s dst: %s src: %s proto: 0x%04X len: %d crc: %X\n",
|
||||||
txt, dst, src, ntohs(*proto), len, crc);
|
txt, dst, src, ntohs(*proto), len, crc);
|
||||||
if (detail) {
|
if (detail) {
|
||||||
|
|
|
@ -357,7 +357,7 @@ t_stat eth_show_devices (FILE* st, DEVICE *dptr, /* show ethernet devices
|
||||||
UNIT* uptr, int32 val, CONST char* desc);
|
UNIT* uptr, int32 val, CONST char* desc);
|
||||||
void eth_show_dev (FILE*st, ETH_DEV* dev); /* show ethernet device state */
|
void eth_show_dev (FILE*st, ETH_DEV* dev); /* show ethernet device state */
|
||||||
|
|
||||||
void eth_mac_fmt (const ETH_MAC* add, char* buffer); /* format ethernet mac address */
|
void eth_mac_fmt (ETH_MAC* const add, char* buffer); /* format ethernet mac address */
|
||||||
t_stat eth_mac_scan (ETH_MAC* mac, const char* strmac); /* scan string for mac, put in mac */
|
t_stat eth_mac_scan (ETH_MAC* mac, const char* strmac); /* scan string for mac, put in mac */
|
||||||
|
|
||||||
t_stat ethq_init (ETH_QUE* que, int max); /* initialize FIFO queue */
|
t_stat ethq_init (ETH_QUE* que, int max); /* initialize FIFO queue */
|
||||||
|
|
Loading…
Add table
Reference in a new issue