You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: netstat.go
    path of file: ./repos/zeebe/clients/go/vendor/github.com/power-devops/perfstat
    
    the code of the file until where you have to start completion: // +build aix

package perfstat

/*
#cgo LDFLAGS: -lperfstat

#include <libperfstat.h>
#include <string.h>
#include <stdlib.h>

#include "c_helpers.h"
*/
import "C"

import (
	"fmt"
	"unsafe"
)

func NetIfaceTotalStat() (*NetIfaceTotal, error) {
	var nif C.perfstat_netinterface_total_t

	rc := C.perfstat_netinterface_total(nil, &nif, C.sizeof_perfstat_netinterface_total_t, 1)
	if rc != 1 {
		return nil, fmt.Errorf("perfstat_netinterface_total() error")
	}
	n := perfstatnetinterfacetotal2netifacetotal(nif)
	return &n, nil
}

func NetBufferStat() ([]NetBuffer, error) {
	var nbuf *C.perfstat_netbuffer_t
	var first C.perfstat_id_t

	numbuf := C.perfstat_netbuffer(nil, nil, C.sizeof_perfstat_netbuffer_t, 0)
	if nu
    
func NetAdapterStat() ([]NetAdapter, error) {
	var adapters *C.perfstat_netadapter_t
	var first C.perfstat_id_t

	numad := C.perfstat_netadapter(nil, nil, C.sizeof_perfstat_netadapter_t, 0)
	if numad < 0 {
		return nil, fmt.Errorf("perfstat_netadater() error")
	}
	if numad == 0 {
		return []NetAdapter{}, fmt.Errorf("no network adapters found")
	}

	adplen := C.sizeof_perfstat_netadapter_t * C.ulong(numad)
	adapters = (*C.perfstat_netadapter_t)(C.malloc(adplen))
	defer C.free(unsafe.Pointer(adapters))
	C.strcpy(&first.name[0], C.CString(C.FIRST_NETINTERFACE))
	r := C.perfstat_netadapter(&first, adapters, C.sizeof_perfstat_netadapter_t, numad)
	if r < 0 {
		return nil, fmt.Errorf("perfstat_netadapter() error")
	}
	ads := make([]NetAdapter, r)
	for i := 0; i < int(r); i++ {
		b := C.get_netadapter_stat(adapters, C.int(i))
		if b != nil {
			ads[i] = perfstatnetadapter2netadapter(b)
		}
	}
	return ads, nil
}