mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-07 13:03:45 +02:00
cleanup
This commit is contained in:
parent
59ee0cfe88
commit
24c9577e39
1 changed files with 4 additions and 13 deletions
|
@ -312,20 +312,14 @@ public:
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ZT_ALWAYS_INLINE Fragment() :
|
ZT_ALWAYS_INLINE Fragment() :
|
||||||
Buffer<ZT_PROTO_MAX_PACKET_LENGTH>()
|
Buffer<ZT_PROTO_MAX_PACKET_LENGTH>() {}
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
template<unsigned int C2>
|
template<unsigned int C2>
|
||||||
ZT_ALWAYS_INLINE Fragment(const Buffer<C2> &b) :
|
ZT_ALWAYS_INLINE Fragment(const Buffer<C2> &b) :
|
||||||
Buffer<ZT_PROTO_MAX_PACKET_LENGTH>(b)
|
Buffer<ZT_PROTO_MAX_PACKET_LENGTH>(b) {}
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
ZT_ALWAYS_INLINE Fragment(const void *data,unsigned int len) :
|
ZT_ALWAYS_INLINE Fragment(const void *data,unsigned int len) :
|
||||||
Buffer<ZT_PROTO_MAX_PACKET_LENGTH>(data,len)
|
Buffer<ZT_PROTO_MAX_PACKET_LENGTH>(data,len) {}
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize from a packet
|
* Initialize from a packet
|
||||||
|
@ -414,10 +408,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* @return Raw packet payload
|
* @return Raw packet payload
|
||||||
*/
|
*/
|
||||||
ZT_ALWAYS_INLINE const unsigned char *payload() const
|
ZT_ALWAYS_INLINE const unsigned char *payload() const { return field(ZT_PACKET_FRAGMENT_IDX_PAYLOAD,size() - ZT_PACKET_FRAGMENT_IDX_PAYLOAD); }
|
||||||
{
|
|
||||||
return field(ZT_PACKET_FRAGMENT_IDX_PAYLOAD,size() - ZT_PACKET_FRAGMENT_IDX_PAYLOAD);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue