Improved receive.go
- Fixed configuration listen-port semantics - Improved receive.go code for updating listen port - Updated under load detection, how follows the kernel space implementation - Fixed trie bug accidentally introduced in last commit - Added interface name to log (format still subject to change) - Can now configure the logging level using the LOG_LEVEL variable - Begin porting netsh.sh tests - A number of smaller changes
This commit is contained in:
parent
cba1d6585a
commit
a4eff12d7f
16 changed files with 616 additions and 218 deletions
|
|
@ -2,8 +2,8 @@ package main
|
|||
|
||||
import (
|
||||
"crypto/rand"
|
||||
"encoding/binary"
|
||||
"sync"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
/* Index=0 is reserved for unset indecies
|
||||
|
|
@ -24,7 +24,8 @@ type IndexTable struct {
|
|||
func randUint32() (uint32, error) {
|
||||
var buff [4]byte
|
||||
_, err := rand.Read(buff[:])
|
||||
return *((*uint32)(unsafe.Pointer(&buff))), err
|
||||
value := binary.LittleEndian.Uint32(buff[:])
|
||||
return value, err
|
||||
}
|
||||
|
||||
func (table *IndexTable) Init() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue