rndis_debug.c File Reference

RNDIS (Remote Network Driver Interface Specification) More...

#include "os_port.h"
#include "rndis_debug.h"
#include "debug.h"

Go to the source code of this file.

Macros

#define TRACE_LEVEL   TRACE_LEVEL_INFO
 
#define TRACE_DEBUG(...)   fprintf(stderr, __VA_ARGS__)
 
#define TRACE_DEBUG_ARRAY(p, a, n)   debugDisplayArray(stderr, p, a, n)
 

Functions

error_t rndisDumpMsg (const RndisMsg *message, size_t length)
 Dump RNDIS message for debugging purpose. More...
 
error_t rndisDumpPacketMsg (const RndisPacketMsg *message, size_t length)
 Dump REMOTE_NDIS_PACKET_MSG message. More...
 
error_t rndisDumpInitializeMsg (const RndisInitializeMsg *message, size_t length)
 Dump REMOTE_NDIS_INITIALIZE_MSG message. More...
 
error_t rndisDumpHaltMsg (const RndisHaltMsg *message, size_t length)
 Dump REMOTE_NDIS_HALT_MSG message. More...
 
error_t rndisDumpQueryMsg (const RndisQueryMsg *message, size_t length)
 Dump REMOTE_NDIS_QUERY_MSG message. More...
 
error_t rndisDumpSetMsg (const RndisSetMsg *message, size_t length)
 Dump REMOTE_NDIS_SET_MSG message. More...
 
error_t rndisDumpResetMsg (const RndisResetMsg *message, size_t length)
 Dump REMOTE_NDIS_RESET_MSG message. More...
 
error_t rndisDumpIndicateStatusMsg (const RndisIndicateStatusMsg *message, size_t length)
 Dump REMOTE_NDIS_INDICATE_STATUS_MSG message. More...
 
error_t rndisDumpKeepAliveMsg (const RndisKeepAliveMsg *message, size_t length)
 Dump REMOTE_NDIS_KEEPALIVE_MSG message. More...
 
error_t rndisDumpInitializeCmplt (const RndisInitializeCmplt *message, size_t length)
 Dump REMOTE_NDIS_INITIALIZE_CMPLT message. More...
 
error_t rndisDumpQueryCmplt (const RndisQueryCmplt *message, size_t length)
 Dump REMOTE_NDIS_QUERY_CMPLT message. More...
 
error_t rndisDumpSetCmplt (const RndisSetCmplt *message, size_t length)
 Dump REMOTE_NDIS_SET_CMPLT message. More...
 
error_t rndisDumpResetCmplt (const RndisResetCmplt *message, size_t length)
 Dump REMOTE_NDIS_RESET_CMPLT message. More...
 
error_t rndisDumpKeepAliveCmplt (const RndisKeepAliveCmplt *message, size_t length)
 Dump REMOTE_NDIS_KEEPALIVE_CMPLT message. More...
 
const char_trndisFindName (uint32_t value, const RndisValueName *table, size_t size)
 Helper function. More...
 

Variables

const RndisValueName rndisMsgLabel []
 
const RndisValueName rndisStatusLabel []
 
const RndisValueName rndisOidLabel []
 

Detailed Description

RNDIS (Remote Network Driver Interface Specification)

License

SPDX-License-Identifier: GPL-2.0-or-later

Copyright (C) 2010-2024 Oryx Embedded SARL. All rights reserved.

This file is part of CycloneTCP Open.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
2.4.4

Definition in file rndis_debug.c.

Macro Definition Documentation

◆ TRACE_DEBUG

#define TRACE_DEBUG (   ...)    fprintf(stderr, __VA_ARGS__)

Definition at line 42 of file rndis_debug.c.

◆ TRACE_DEBUG_ARRAY

#define TRACE_DEBUG_ARRAY (   p,
  a,
  n 
)    debugDisplayArray(stderr, p, a, n)

Definition at line 44 of file rndis_debug.c.

◆ TRACE_LEVEL

#define TRACE_LEVEL   TRACE_LEVEL_INFO

Definition at line 32 of file rndis_debug.c.

Function Documentation

◆ rndisDumpHaltMsg()

error_t rndisDumpHaltMsg ( const RndisHaltMsg message,
size_t  length 
)

Dump REMOTE_NDIS_HALT_MSG message.

Parameters
[in]messagePointer to the RNDIS message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 273 of file rndis_debug.c.

◆ rndisDumpIndicateStatusMsg()

error_t rndisDumpIndicateStatusMsg ( const RndisIndicateStatusMsg message,
size_t  length 
)

Dump REMOTE_NDIS_INDICATE_STATUS_MSG message.

Parameters
[in]messagePointer to the RNDIS message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 405 of file rndis_debug.c.

◆ rndisDumpInitializeCmplt()

error_t rndisDumpInitializeCmplt ( const RndisInitializeCmplt message,
size_t  length 
)

Dump REMOTE_NDIS_INITIALIZE_CMPLT message.

Parameters
[in]messagePointer to the RNDIS message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 481 of file rndis_debug.c.

◆ rndisDumpInitializeMsg()

error_t rndisDumpInitializeMsg ( const RndisInitializeMsg message,
size_t  length 
)

Dump REMOTE_NDIS_INITIALIZE_MSG message.

Parameters
[in]messagePointer to the RNDIS message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 249 of file rndis_debug.c.

◆ rndisDumpKeepAliveCmplt()

error_t rndisDumpKeepAliveCmplt ( const RndisKeepAliveCmplt message,
size_t  length 
)

Dump REMOTE_NDIS_KEEPALIVE_CMPLT message.

Parameters
[in]messagePointer to the RNDIS message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 627 of file rndis_debug.c.

◆ rndisDumpKeepAliveMsg()

error_t rndisDumpKeepAliveMsg ( const RndisKeepAliveMsg message,
size_t  length 
)

Dump REMOTE_NDIS_KEEPALIVE_MSG message.

Parameters
[in]messagePointer to the RNDIS message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 460 of file rndis_debug.c.

◆ rndisDumpMsg()

error_t rndisDumpMsg ( const RndisMsg message,
size_t  length 
)

Dump RNDIS message for debugging purpose.

Parameters
[in]messagePointer to the RNDIS message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 124 of file rndis_debug.c.

◆ rndisDumpPacketMsg()

error_t rndisDumpPacketMsg ( const RndisPacketMsg message,
size_t  length 
)

Dump REMOTE_NDIS_PACKET_MSG message.

Parameters
[in]messagePointer to the RNDIS message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 220 of file rndis_debug.c.

◆ rndisDumpQueryCmplt()

error_t rndisDumpQueryCmplt ( const RndisQueryCmplt message,
size_t  length 
)

Dump REMOTE_NDIS_QUERY_CMPLT message.

Parameters
[in]messagePointer to the RNDIS message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 521 of file rndis_debug.c.

◆ rndisDumpQueryMsg()

error_t rndisDumpQueryMsg ( const RndisQueryMsg message,
size_t  length 
)

Dump REMOTE_NDIS_QUERY_MSG message.

Parameters
[in]messagePointer to the RNDIS message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 294 of file rndis_debug.c.

◆ rndisDumpResetCmplt()

error_t rndisDumpResetCmplt ( const RndisResetCmplt message,
size_t  length 
)

Dump REMOTE_NDIS_RESET_CMPLT message.

Parameters
[in]messagePointer to the RNDIS message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 596 of file rndis_debug.c.

◆ rndisDumpResetMsg()

error_t rndisDumpResetMsg ( const RndisResetMsg message,
size_t  length 
)

Dump REMOTE_NDIS_RESET_MSG message.

Parameters
[in]messagePointer to the RNDIS message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 384 of file rndis_debug.c.

◆ rndisDumpSetCmplt()

error_t rndisDumpSetCmplt ( const RndisSetCmplt message,
size_t  length 
)

Dump REMOTE_NDIS_SET_CMPLT message.

Parameters
[in]messagePointer to the RNDIS message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 565 of file rndis_debug.c.

◆ rndisDumpSetMsg()

error_t rndisDumpSetMsg ( const RndisSetMsg message,
size_t  length 
)

Dump REMOTE_NDIS_SET_MSG message.

Parameters
[in]messagePointer to the RNDIS message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 339 of file rndis_debug.c.

◆ rndisFindName()

const char_t* rndisFindName ( uint32_t  value,
const RndisValueName table,
size_t  size 
)

Helper function.

Parameters
[in]value32-bit value
[in]tableLook-up table
[in]sizeNumber of entries in the look-up table
Returns
Pointer to the matching name, if any

Definition at line 659 of file rndis_debug.c.

Variable Documentation

◆ rndisMsgLabel

const RndisValueName rndisMsgLabel[]
Initial value:
=
{
{0x00000001, "REMOTE_NDIS_PACKET_MSG"},
{0x00000002, "REMOTE_NDIS_INITIALIZE_MSG"},
{0x80000002, "REMOTE_NDIS_INITIALIZE_CMPLT"},
{0x00000003, "REMOTE_NDIS_HALT_MSG"},
{0x00000004, "REMOTE_NDIS_QUERY_MSG"},
{0x80000004, "REMOTE_NDIS_QUERY_CMPLT"},
{0x00000005, "REMOTE_NDIS_SET_MSG"},
{0x80000005, "REMOTE_NDIS_SET_CMPLT"},
{0x00000006, "REMOTE_NDIS_RESET_MSG"},
{0x80000006, "REMOTE_NDIS_RESET_CMPLT"},
{0x00000007, "REMOTE_NDIS_INDICATE_STATUS_MSG"},
{0x00000008, "REMOTE_NDIS_KEEPALIVE_CMPLT"},
{0x80000008, "REMOTE_NDIS_KEEPALIVE_CMPLT"}
}

Definition at line 48 of file rndis_debug.c.

◆ rndisOidLabel

const RndisValueName rndisOidLabel[]

Definition at line 77 of file rndis_debug.c.

◆ rndisStatusLabel

const RndisValueName rndisStatusLabel[]
Initial value:
=
{
{0x00000000, "RNDIS_STATUS_SUCCESS"},
{0xC0000001, "RNDIS_STATUS_FAILURE"},
{0xC0010015, "RNDIS_STATUS_INVALID_DATA"},
{0xC00000BB, "RNDIS_STATUS_NOT_SUPPORTED"},
{0x4001000B, "RNDIS_STATUS_MEDIA_CONNECT"},
{0x4001000C, "RNDIS_STATUS_MEDIA_DISCONNECT"}
}

Definition at line 66 of file rndis_debug.c.