Documentation ¶
Index ¶
- Constants
- Variables
- func Arp_resolve(sip, dip Ip4_t) (*Mac_t, defs.Err_t)
- func Fastmillis() millis_t
- func Net_init(pm mem.Page_i)
- func Net_start(pkt [][]uint8, tlen int)
- func Netdump()
- func Nic_insert(ip Ip4_t, n nic_i)
- func Nic_lookup(lip Ip4_t) (nic_i, bool)
- type Tcpfops_t
- func (tf *Tcpfops_t) Accept(fdops.Userio_i) (fdops.Fdops_i, int, defs.Err_t)
- func (tf *Tcpfops_t) Bind(saddr []uint8) defs.Err_t
- func (tf *Tcpfops_t) Close() defs.Err_t
- func (tf *Tcpfops_t) Connect(saddr []uint8) defs.Err_t
- func (tf *Tcpfops_t) Fcntl(cmd, opt int) int
- func (tf *Tcpfops_t) Fstat(st *stat.Stat_t) defs.Err_t
- func (tf *Tcpfops_t) Getsockopt(opt int, bufarg fdops.Userio_i, intarg int) (int, defs.Err_t)
- func (tf *Tcpfops_t) Listen(backlog int) (fdops.Fdops_i, defs.Err_t)
- func (tf *Tcpfops_t) Lseek(int, int) (int, defs.Err_t)
- func (tf *Tcpfops_t) Mmapi(int, int, bool) ([]mem.Mmapinfo_t, defs.Err_t)
- func (tf *Tcpfops_t) Pathi() defs.Inum_t
- func (tf *Tcpfops_t) Pollone(pm fdops.Pollmsg_t) (fdops.Ready_t, defs.Err_t)
- func (tf *Tcpfops_t) Pread(dst fdops.Userio_i, offset int) (int, defs.Err_t)
- func (tf *Tcpfops_t) Pwrite(src fdops.Userio_i, offset int) (int, defs.Err_t)
- func (tf *Tcpfops_t) Read(dst fdops.Userio_i) (int, defs.Err_t)
- func (tf *Tcpfops_t) Recvmsg(dst fdops.Userio_i, fromsa fdops.Userio_i, cmsg fdops.Userio_i, flag int) (int, int, int, defs.Msgfl_t, defs.Err_t)
- func (tf *Tcpfops_t) Reopen() defs.Err_t
- func (tf *Tcpfops_t) Sendmsg(src fdops.Userio_i, toaddr []uint8, cmsg []uint8, flags int) (int, defs.Err_t)
- func (tf *Tcpfops_t) Set(tcb *Tcptcb_t, opt defs.Fdopt_t)
- func (tf *Tcpfops_t) Setsockopt(lev, opt int, src fdops.Userio_i, intarg int) defs.Err_t
- func (tf *Tcpfops_t) Shutdown(read, write bool) defs.Err_t
- func (tf *Tcpfops_t) Truncate(newlen uint) defs.Err_t
- func (tf *Tcpfops_t) Write(src fdops.Userio_i) (int, defs.Err_t)
- type Tcptcb_t
Constants ¶
View Source
const ( // the following is for newly created tcbs TCPNEW tcpstate_t = iota SYNSENT SYNRCVD // LISTEN is not really used LISTEN ESTAB FINWAIT1 FINWAIT2 CLOSING CLOSEWAIT LASTACK TIMEWAIT CLOSED )
View Source
const Secondms millis_t = 1000
Variables ¶
View Source
var Routetbl routetbl_t
Functions ¶
func Arp_resolve ¶
returns destination mac and error
func Fastmillis ¶
func Fastmillis() millis_t
func Net_start ¶
network stack processing begins here. pkt references DMA memory and will be clobbered once net_start returns to the caller.
func Nic_insert ¶
func Nic_insert(ip Ip4_t, n nic_i)
func Nic_lookup ¶
func Nic_lookup(lip Ip4_t) (nic_i, bool)
Types ¶
type Tcpfops_t ¶
type Tcpfops_t struct {
// contains filtered or unexported fields
}
active connect fops
func (*Tcpfops_t) Getsockopt ¶
func (*Tcpfops_t) Sendmsg ¶
func (tf *Tcpfops_t) Sendmsg(src fdops.Userio_i, toaddr []uint8, cmsg []uint8, flags int) (int, defs.Err_t)
XXX read/write should be wrapper around recvmsg/sendmsg
func (*Tcpfops_t) Setsockopt ¶
Click to show internal directories.
Click to hide internal directories.