Updated
This commit is contained in:
parent
0c1c042978
commit
fb9e8c3bf0
2 changed files with 10 additions and 3 deletions
|
@ -533,7 +533,7 @@ int main(int argc, const char* argv[])
|
||||||
|
|
||||||
if (type == REWIND_TYPE_EXTERNAL_SERVER)
|
if (type == REWIND_TYPE_EXTERNAL_SERVER)
|
||||||
{
|
{
|
||||||
repeaterSocketAddress.sin_port = htons(proxyMediaPort);
|
repeaterSocketAddress.sin_port = htons(KAIROS_HAM_DEFAULT_PORT);
|
||||||
sendto(mediaHandle, incomingBuffer->data, length, 0, (struct sockaddr*)&repeaterSocketAddress, sizeof(struct sockaddr_in));
|
sendto(mediaHandle, incomingBuffer->data, length, 0, (struct sockaddr*)&repeaterSocketAddress, sizeof(struct sockaddr_in));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -610,6 +610,7 @@ int main(int argc, const char* argv[])
|
||||||
length += sizeof(struct RewindData);
|
length += sizeof(struct RewindData);
|
||||||
sendto(uplinkHandle, outgoingBuffer, length, 0, serverAddress->ai_addr, serverAddress->ai_addrlen);
|
sendto(uplinkHandle, outgoingBuffer, length, 0, serverAddress->ai_addr, serverAddress->ai_addrlen);
|
||||||
}
|
}
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -642,6 +643,7 @@ int main(int argc, const char* argv[])
|
||||||
(length >= 8))
|
(length >= 8))
|
||||||
{
|
{
|
||||||
outgoingBuffer->type = htole16(REWIND_TYPE_REMOTE_CONTROL);
|
outgoingBuffer->type = htole16(REWIND_TYPE_REMOTE_CONTROL);
|
||||||
|
outgoingBuffer->flags = htole16(REWIND_FLAG_DEFAULT_SET);
|
||||||
outgoingBuffer->number = htole32(++ sequenceNumbers[0]);
|
outgoingBuffer->number = htole32(++ sequenceNumbers[0]);
|
||||||
outgoingBuffer->length = htole16(length);
|
outgoingBuffer->length = htole16(length);
|
||||||
length += sizeof(struct RewindData);
|
length += sizeof(struct RewindData);
|
||||||
|
@ -692,6 +694,7 @@ int main(int argc, const char* argv[])
|
||||||
(length >= 20))
|
(length >= 20))
|
||||||
{
|
{
|
||||||
outgoingBuffer->type = htole16(REWIND_TYPE_SNMP_TRAP);
|
outgoingBuffer->type = htole16(REWIND_TYPE_SNMP_TRAP);
|
||||||
|
outgoingBuffer->flags = htole16(REWIND_FLAG_DEFAULT_SET);
|
||||||
outgoingBuffer->number = htole32(++ sequenceNumbers[0]);
|
outgoingBuffer->number = htole32(++ sequenceNumbers[0]);
|
||||||
outgoingBuffer->length = htole16(length);
|
outgoingBuffer->length = htole16(length);
|
||||||
length += sizeof(struct RewindData);
|
length += sizeof(struct RewindData);
|
||||||
|
@ -728,6 +731,7 @@ int main(int argc, const char* argv[])
|
||||||
data->number = htole32(repeaterNumber);
|
data->number = htole32(repeaterNumber);
|
||||||
|
|
||||||
outgoingBuffer->type = htole16(REWIND_TYPE_KEEP_ALIVE);
|
outgoingBuffer->type = htole16(REWIND_TYPE_KEEP_ALIVE);
|
||||||
|
outgoingBuffer->flags = htole16(REWIND_FLAG_DEFAULT_SET);
|
||||||
outgoingBuffer->number = htole32(++ sequenceNumbers[0]);
|
outgoingBuffer->number = htole32(++ sequenceNumbers[0]);
|
||||||
outgoingBuffer->length = htobe16(length);
|
outgoingBuffer->length = htobe16(length);
|
||||||
length += sizeof(struct RewindData);
|
length += sizeof(struct RewindData);
|
||||||
|
@ -749,6 +753,7 @@ int main(int argc, const char* argv[])
|
||||||
{
|
{
|
||||||
#endif
|
#endif
|
||||||
outgoingBuffer->type = htole16(REWIND_TYPE_CLOSE);
|
outgoingBuffer->type = htole16(REWIND_TYPE_CLOSE);
|
||||||
|
outgoingBuffer->flags = htole16(REWIND_FLAG_DEFAULT_SET);
|
||||||
outgoingBuffer->number = htole32(++ sequenceNumbers[0]);
|
outgoingBuffer->number = htole32(++ sequenceNumbers[0]);
|
||||||
outgoingBuffer->length = 0;
|
outgoingBuffer->length = 0;
|
||||||
sendto(uplinkHandle, outgoingBuffer, sizeof(struct RewindData), 0, serverAddress->ai_addr, serverAddress->ai_addrlen);
|
sendto(uplinkHandle, outgoingBuffer, sizeof(struct RewindData), 0, serverAddress->ai_addr, serverAddress->ai_addrlen);
|
||||||
|
|
6
Rewind.h
6
Rewind.h
|
@ -36,8 +36,10 @@ extern "C"
|
||||||
#define REWIND_TYPE_REMOTE_CONTROL (REWIND_CLASS_KAIROS_DATA + 1)
|
#define REWIND_TYPE_REMOTE_CONTROL (REWIND_CLASS_KAIROS_DATA + 1)
|
||||||
#define REWIND_TYPE_SNMP_TRAP (REWIND_CLASS_KAIROS_DATA + 2)
|
#define REWIND_TYPE_SNMP_TRAP (REWIND_CLASS_KAIROS_DATA + 2)
|
||||||
|
|
||||||
#define REWIND_FLAG_SLOT_1 (1 << 0)
|
#define REWIND_FLAG_NONE 0
|
||||||
#define REWIND_FLAG_SLOT_2 (1 << 1)
|
#define REWIND_FLAG_REAL_TIME_1 (1 << 0)
|
||||||
|
#define REWIND_FLAG_REAL_TIME_2 (1 << 1)
|
||||||
|
#define REWIND_FLAG_DEFAULT_SET REWIND_FLAG_NONE
|
||||||
|
|
||||||
struct RewindVersionData
|
struct RewindVersionData
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue