Skip to content

Commit

Permalink
Merge #996 branch 'eugeneia/public-packet_t' into next
Browse files Browse the repository at this point in the history
Grabbing revert of the packet_t type since we decided to go with
'struct packet' directly instead.

See discussion at #997 (comment)
  • Loading branch information
lukego committed Aug 29, 2016
2 parents 54ac86d + cc829d2 commit dccd79f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ Returns a structure holding ring statistics for the *link*:

## Packet (core.packet)

A *packet* is an FFI object of type `packet.packet_t` representing a network
A *packet* is an FFI object of type `struct packet` representing a network
packet that is currently being processed. The packet is used to explicitly
manage the life cycle of the packet. Packets are explicitly allocated and freed
by using `packet.allocate` and `packet.free`. When a packet is received using
Expand All @@ -345,7 +345,7 @@ freed. The number of allocatable packets is limited by the size of the
underlying “freelist”, e.g. a pool of unused packet objects from and to which
packets are allocated and freed.

Ctype **packet.packet_t**
Type **struct packet**

```
struct packet {
Expand Down
4 changes: 2 additions & 2 deletions src/core/packet.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ local counter = require("core.counter")

require("core.packet_h")

packet_t = ffi.typeof("struct packet")
local packet_ptr_t = ffi.typeof("$ *", packet_t)
local packet_t = ffi.typeof("struct packet")
local packet_ptr_t = ffi.typeof("struct packet *")
local packet_size = ffi.sizeof(packet_t)
local header_size = 8
max_payload = tonumber(C.PACKET_PAYLOAD_SIZE)
Expand Down

0 comments on commit dccd79f

Please sign in to comment.