Documentation ¶
Overview ¶
config.go -- samtun configuration
link.go -- link level protocol
Index ¶
- Constants
- Variables
- func BencodeReadList(r io.Reader) ([]interface{}, error)
- func BencodeReadMap(r io.Reader) (map[string]interface{}, error)
- func BencodeReadString(r io.Reader) ([]byte, error)
- func BencodeWrite(obj interface{}, w io.Writer) (err error)
- func BencodeWriteInt(i int64, w io.Writer) (err error)
- func BencodeWriteList(ls []interface{}, w io.Writer) (err error)
- func BencodeWriteMap(m map[string]interface{}, w io.Writer) (err error)
- func BencodeWriteString(str []byte, w io.Writer) (err error)
- func RunClient(args []string)
- func RunExit(args []string)
Constants ¶
View Source
const ( NULL_METH = iota /* client / server says that we are alive param: 'pn' -> packet number for jitter calculation return: no response needed */ ALIVE_PING /** client says make new tunnel to inet address range param: 'cidr' -> the cidr to access return: tunnel id or 0 if rejected */ CLIENT_TUN_NEW /** client says done with tunnel param: 'tid' -> the tunnel id or 0 for all return: always 0 */ CLIENT_TUN_DEL /** server says tunnel with tunnel id that we had is now gone param: 'tid' -> the tunnel who is gone return: no response needed */ SERVER_TUN_BAI /* either client or server says "here are ip packets for tunnel with tid" param: 'tid' -> the tunnel that we are sending on param: 'pkts' -> bytes of link packets return: no response needed */ RELAY_TUN_DATA )
Variables ¶
View Source
var K_CIDR = "cidr"
View Source
var K_PKTS = "pkts"
View Source
var K_PN = "pn"
View Source
var K_TID = "tid"
Functions ¶
func BencodeReadList ¶
func BencodeWrite ¶
func BencodeWriteList ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.