portmapper

package
v0.0.0-...-1ea2c94 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2018 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PMAP_PORT    int    = 111
	PMAP_PROGRAM uint32 = 100000
	PMAP_VER     uint32 = 2
	PMAP_ADDR    string = "127.0.0.1"
	IPPROTO_TCP  uint32 = 6
	IPPROTO_UDP  uint32 = 17
)
View Source
const (
	PMAPPROC_NULL uint32 = iota
	PMAPPROC_SET
	PMAPPROC_UNSET
	PMAPPROC_GETPORT
	PMAPPROC_DUMP
	PMAPPROC_CALLIT /* No 5 */
)

Variables

View Source
var PmapProcList = [...]string{
	0: "PmapProc.PmapProc2_null",
	1: "PmapProc.PmapProc2_set",
	2: "PmapProc.PmapProc2_unset",
	3: "PmapProc.PmapProc2_getport",
	4: "PmapProc.PmapProc2_dump",
	5: "PmapProc.PmapProc2_callit",
}

for server implementation, define PmapProc as type int with proc interfaces

Functions

func PmapSet

func PmapSet(programNumber, programVersion uint32, port uint32) (bool, error)

func PmapUnset

func PmapUnset(programNumber, programVersion uint32) (bool, error)

Types

type Mapping

type Mapping struct {
	Program  uint32
	Version  uint32
	Protocol uint32
	Port     uint32
}

Jump to

Keyboard shortcuts

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