Skip to content

Commit

Permalink
Alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
AudriusButkevicius committed Nov 22, 2017
1 parent 09b3cfd commit 56143fe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 3 additions & 1 deletion conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@ import (
)

type FilteredConn struct {
// Alignment
deadline atomic.Value

source *PacketFilter
priority int

recvBuffer chan packet

filter Filter

deadline atomic.Value
closed chan struct{}
}

Expand Down
7 changes: 4 additions & 3 deletions filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,14 @@ func NewPacketFilter(conn net.PacketConn) *PacketFilter {

// PacketFilter embeds a net.PacketConn to perform the filtering.
type PacketFilter struct {
// Alignment
dropped uint64
overflow uint64

net.PacketConn

conns []*FilteredConn
mut sync.Mutex

dropped uint64
overflow uint64
}

// NewConn returns a new net.PacketConn object which filters packets based
Expand Down

0 comments on commit 56143fe

Please sign in to comment.