syscall

package
Version: v1.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

README

Syscall

The code from Package syscall is used for wrapping syscall functions from different platforms that the standard syscall library does not provide.

Steps to produce files in the directory:

  1. Clone the repo golang/sys and put your types and const definitions in the linux/types.go.
  2. Run GOOS=linux GOARCH=amd64 ./mkall.sh from golang/sys/internal-branch.go1.17-vendor. Don't worry about GOARCH, it will generate the required files for all possible Linux architectures.
  3. Copy the generated code ztypes_linux.go and hand-writing code types.go to this directory.
  4. Add your syscall functions in syscall_unix.go.

Documentation

Index

Constants

View Source
const (
	IGMPMSG_NOCACHE  = 0x1
	VIFF_USE_IFINDEX = 0x8
	MRT_ADD_VIF      = 0xca
	MRT_ADD_MFC      = 0xcc
	MRT_DEL_MFC      = 0xcd
	MRT_INIT         = 0xc8
	MRT_FLUSH        = 0xd4
	MAXVIFS          = 0x20
)
View Source
const SizeofIgmpmsg = 0x14
View Source
const SizeofMfcctl = 0x3c
View Source
const SizeofVifctl = 0x10

Variables

This section is empty.

Functions

func SetsockoptMfcctl

func SetsockoptMfcctl(fd, level, opt int, mfcctl *Mfcctl) error

func SetsockoptVifctl

func SetsockoptVifctl(fd, level, opt int, vifctl *Vifctl) error

Types

type Mfcctl

type Mfcctl struct {
	Origin   [4]byte /* in_addr */
	Mcastgrp [4]byte /* in_addr */
	Parent   uint16
	Ttls     [32]uint8
	Pkt_cnt  uint32
	Byte_cnt uint32
	Wrong_if uint32
	Expire   int32
}

type Vifctl

type Vifctl struct {
	Vifi        uint16
	Flags       uint8
	Threshold   uint8
	Rate_limit  uint32
	Lcl_ifindex int32
	Rmt_addr    [4]byte /* in_addr */
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL