Commit 1989baa3 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Implement seqno_plus.

parent 85a65036
...@@ -56,6 +56,12 @@ seqno_minus(unsigned short s1, unsigned short s2) ...@@ -56,6 +56,12 @@ seqno_minus(unsigned short s1, unsigned short s2)
return ((s1 - s2) & 0xFFFF); return ((s1 - s2) & 0xFFFF);
} }
unsigned short
seqno_plus(unsigned short s, int plus)
{
return ((s + plus) & 0xFFFF);
}
void void
timeval_minus(struct timeval *d, timeval_minus(struct timeval *d,
const struct timeval *s1, const struct timeval *s2) const struct timeval *s1, const struct timeval *s2)
......
...@@ -24,6 +24,8 @@ int seqno_compare(unsigned short s1, unsigned short s2) ...@@ -24,6 +24,8 @@ int seqno_compare(unsigned short s1, unsigned short s2)
ATTRIBUTE ((const)); ATTRIBUTE ((const));
int seqno_minus(unsigned short s1, unsigned short s2) int seqno_minus(unsigned short s1, unsigned short s2)
ATTRIBUTE ((const)); ATTRIBUTE ((const));
unsigned short seqno_plus(unsigned short s, int plus)
ATTRIBUTE ((const));
void timeval_minus(struct timeval *d, void timeval_minus(struct timeval *d,
const struct timeval *s1, const struct timeval *s2); const struct timeval *s1, const struct timeval *s2);
int timeval_minus_msec(const struct timeval *s1, const struct timeval *s2) int timeval_minus_msec(const struct timeval *s1, const struct timeval *s2)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment