1
0
mirror of https://github.com/simh/simh.git synced 2026-01-26 04:01:38 +00:00

ETHER: Add support for generated interface MAC addresses

sim> SET XQ MAC=aa:bb:cc:dd:ee:ff{/bits}{>filespec}

where:

- all of the aa:bb:cc:dd:ee:ff values must be hex digits
- bits is the number of bits which are to be taken from the supplied
   MAC aa:bb:cc:dd:ee:ff with legal values from 16 to 48 and a default
   of 48 bits.
- filespec specifies a file which contains the MAC address to be used
   and if it doesn't exist an appropriate generated address will be stored
   in this file and a subsequent SET MAC invocation specifying the same
   file will use the value stored in the file rather than generating a new
   MAC.

As discussed in #317
This commit is contained in:
Mark Pizzolato
2016-05-23 16:56:06 -07:00
parent 63510629d9
commit 2d907980f1
4 changed files with 184 additions and 18 deletions

View File

@@ -359,6 +359,8 @@ void eth_show_dev (FILE*st, ETH_DEV* dev); /* show ethernet device
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_ex (ETH_MAC* mac, /* scan string for mac, put in mac */
const char* strmac, UNIT *uptr);/* for specified unit */
t_stat ethq_init (ETH_QUE* que, int max); /* initialize FIFO queue */
void ethq_clear (ETH_QUE* que); /* clear FIFO queue */