SetNodeInterface selects the hardware address to be used for Version 1 UUIDs. If name is "" then the first usable interface found will be used or a random Node ID will be generated. If a named interface cannot be found then false is returned. SetNodeInterface never fails when name is "".
(name string)
| 31 | // |
| 32 | // SetNodeInterface never fails when name is "". |
| 33 | func SetNodeInterface(name string) bool { |
| 34 | defer nodeMu.Unlock() |
| 35 | nodeMu.Lock() |
| 36 | return setNodeInterface(name) |
| 37 | } |
| 38 | |
| 39 | func setNodeInterface(name string) bool { |
| 40 | iname, addr := getHardwareInterface(name) // null implementation for js |