code: func (f *Frame) length() int {
  	// If payload is less than the required minimum length, we zero-pad up to
  	// the required minimum length
  	pl := len(f.Payload)
  	if pl < minPayload {
  		pl = minPayload
  	}
  
  	// Add additional length if VLAN tags are needed.
  	var vlanLen int
  	switch {
  	case f.ServiceVLAN != nil && f.VLAN != nil:
  		vlanLen = 8
  	case f.VLAN != nil:
  		vlanLen = 4
  	}
  
  	// 6 bytes: destination hardware address
  	// 6 bytes: source hardware address
  	// N bytes: VLAN tags (if present)
  	// 2 bytes: EtherType
  	// N bytes: payload length (may be padded)
  	return 6 + 6 + vlanLen + 2 + pl
  }
docs: // length calculates the number of bytes required to store a Frame.