github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/net/mac.go (about)

     1  // Copyright 2011 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package net
     6  
     7  // HardwareAddrは物理的なハードウェアアドレスを表します。
     8  type HardwareAddr []byte
     9  
    10  func (a HardwareAddr) String() string
    11  
    12  // ParseMACは、次のいずれかの形式で定義されたIEEE 802 MAC-48、EUI-48、EUI-64、または20オクテットのIP over InfiniBandリンク層アドレスとしてsを解析します:
    13  //
    14  //	00:00:5e:00:53:01
    15  //	02:00:5e:10:00:00:00:01
    16  //	00:00:00:00:fe:80:00:00:00:00:00:00:02:00:5e:10:00:00:00:01
    17  //	00-00-5e-00-53-01
    18  //	02-00-5e-10-00-00-00-01
    19  //	00-00-00-00-fe-80-00-00-00-00-00-00-02-00-5e-10-00-00-00-01
    20  //	0000.5e00.5301
    21  //	0200.5e10.0000.0001
    22  //	0000.0000.fe80.0000.0000.0000.0200.5e10.0000.0001
    23  func ParseMAC(s string) (hw HardwareAddr, err error)