Add beginnings of a RNDIS Ethernet Host demo.
This commit is contained in:
parent
04774208b6
commit
6a46f0025a
14 changed files with 1837 additions and 28 deletions
|
|
@ -259,13 +259,13 @@ void RNDIS_Device_ProcessRNDISControlMessage(USB_ClassInfo_RNDIS_Device_t* const
|
|||
RNDIS_Query_Complete_t* QUERY_Response = (RNDIS_Query_Complete_t*)&RNDISInterfaceInfo->State.RNDISMessageBuffer;
|
||||
uint32_t Query_Oid = QUERY_Message->Oid;
|
||||
|
||||
void* QueryData = &RNDISInterfaceInfo->State.RNDISMessageBuffer[sizeof(RNDIS_Message_Header_t) +
|
||||
QUERY_Message->InformationBufferOffset];
|
||||
void* ResponseData = &RNDISInterfaceInfo->State.RNDISMessageBuffer[sizeof(RNDIS_Query_Complete_t)];
|
||||
void* QueryData = &RNDISInterfaceInfo->State.RNDISMessageBuffer[sizeof(RNDIS_Message_Header_t) +
|
||||
QUERY_Message->InformationBufferOffset];
|
||||
void* ResponseData = &RNDISInterfaceInfo->State.RNDISMessageBuffer[sizeof(RNDIS_Query_Complete_t)];
|
||||
uint16_t ResponseSize;
|
||||
|
||||
QUERY_Response->MessageType = REMOTE_NDIS_QUERY_CMPLT;
|
||||
QUERY_Response->MessageLength = sizeof(RNDIS_Query_Complete_t);
|
||||
QUERY_Response->MessageType = REMOTE_NDIS_QUERY_CMPLT;
|
||||
QUERY_Response->MessageLength = sizeof(RNDIS_Query_Complete_t);
|
||||
|
||||
if (RNDIS_Device_ProcessNDISQuery(RNDISInterfaceInfo, Query_Oid, QueryData, QUERY_Message->InformationBufferLength,
|
||||
ResponseData, &ResponseSize))
|
||||
|
|
@ -292,28 +292,26 @@ void RNDIS_Device_ProcessRNDISControlMessage(USB_ClassInfo_RNDIS_Device_t* const
|
|||
RNDIS_Set_Complete_t* SET_Response = (RNDIS_Set_Complete_t*)&RNDISInterfaceInfo->State.RNDISMessageBuffer;
|
||||
uint32_t SET_Oid = SET_Message->Oid;
|
||||
|
||||
SET_Response->MessageType = REMOTE_NDIS_SET_CMPLT;
|
||||
SET_Response->MessageLength = sizeof(RNDIS_Set_Complete_t);
|
||||
SET_Response->RequestId = SET_Message->RequestId;
|
||||
SET_Response->MessageType = REMOTE_NDIS_SET_CMPLT;
|
||||
SET_Response->MessageLength = sizeof(RNDIS_Set_Complete_t);
|
||||
SET_Response->RequestId = SET_Message->RequestId;
|
||||
|
||||
void* SetData = &RNDISInterfaceInfo->State.RNDISMessageBuffer[sizeof(RNDIS_Message_Header_t) +
|
||||
SET_Message->InformationBufferOffset];
|
||||
void* SetData = &RNDISInterfaceInfo->State.RNDISMessageBuffer[sizeof(RNDIS_Message_Header_t) +
|
||||
SET_Message->InformationBufferOffset];
|
||||
|
||||
if (RNDIS_Device_ProcessNDISSet(RNDISInterfaceInfo, SET_Oid, SetData, SET_Message->InformationBufferLength))
|
||||
SET_Response->Status = REMOTE_NDIS_STATUS_SUCCESS;
|
||||
else
|
||||
SET_Response->Status = REMOTE_NDIS_STATUS_NOT_SUPPORTED;
|
||||
|
||||
SET_Response->Status = RNDIS_Device_ProcessNDISSet(RNDISInterfaceInfo, SET_Oid, SetData,
|
||||
SET_Message->InformationBufferLength) ?
|
||||
REMOTE_NDIS_STATUS_SUCCESS : REMOTE_NDIS_STATUS_NOT_SUPPORTED;
|
||||
break;
|
||||
case REMOTE_NDIS_RESET_MSG:
|
||||
RNDISInterfaceInfo->State.ResponseReady = true;
|
||||
|
||||
RNDIS_Reset_Complete_t* RESET_Response = (RNDIS_Reset_Complete_t*)&RNDISInterfaceInfo->State.RNDISMessageBuffer;
|
||||
|
||||
RESET_Response->MessageType = REMOTE_NDIS_RESET_CMPLT;
|
||||
RESET_Response->MessageLength = sizeof(RNDIS_Reset_Complete_t);
|
||||
RESET_Response->Status = REMOTE_NDIS_STATUS_SUCCESS;
|
||||
RESET_Response->AddressingReset = 0;
|
||||
RESET_Response->MessageType = REMOTE_NDIS_RESET_CMPLT;
|
||||
RESET_Response->MessageLength = sizeof(RNDIS_Reset_Complete_t);
|
||||
RESET_Response->Status = REMOTE_NDIS_STATUS_SUCCESS;
|
||||
RESET_Response->AddressingReset = 0;
|
||||
|
||||
break;
|
||||
case REMOTE_NDIS_KEEPALIVE_MSG:
|
||||
|
|
@ -324,10 +322,10 @@ void RNDIS_Device_ProcessRNDISControlMessage(USB_ClassInfo_RNDIS_Device_t* const
|
|||
RNDIS_KeepAlive_Complete_t* KEEPALIVE_Response =
|
||||
(RNDIS_KeepAlive_Complete_t*)&RNDISInterfaceInfo->State.RNDISMessageBuffer;
|
||||
|
||||
KEEPALIVE_Response->MessageType = REMOTE_NDIS_KEEPALIVE_CMPLT;
|
||||
KEEPALIVE_Response->MessageLength = sizeof(RNDIS_KeepAlive_Complete_t);
|
||||
KEEPALIVE_Response->RequestId = KEEPALIVE_Message->RequestId;
|
||||
KEEPALIVE_Response->Status = REMOTE_NDIS_STATUS_SUCCESS;
|
||||
KEEPALIVE_Response->MessageType = REMOTE_NDIS_KEEPALIVE_CMPLT;
|
||||
KEEPALIVE_Response->MessageLength = sizeof(RNDIS_KeepAlive_Complete_t);
|
||||
KEEPALIVE_Response->RequestId = KEEPALIVE_Message->RequestId;
|
||||
KEEPALIVE_Response->Status = REMOTE_NDIS_STATUS_SUCCESS;
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@
|
|||
*/
|
||||
uint8_t SImage_Host_CloseSession(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
|
||||
|
||||
/** Sends a given PIMA command to the attached device, filling out the PIMA command header automatically as required.
|
||||
/** Sends a given PIMA command to the attached device, filling out the PIMA command header's Transaction ID automatically.
|
||||
*
|
||||
* \param[in,out] SIInterfaceInfo Pointer to a structure containing a Still Image Class host configuration and state
|
||||
* \param[in] Operation PIMA operation code to issue to the device
|
||||
|
|
|
|||
|
|
@ -14,7 +14,11 @@
|
|||
* and supporter. Please consider donating a small amount to support this and my future Open Source projects - All
|
||||
* donations are <i>greatly</i> appreciated.
|
||||
*
|
||||
* <img src='http://www.pledgie.com/campaigns/6927.png?skin_name=chrome' border='0'></img>
|
||||
* Note that commercial entities can remove the attribution portion of the LUFA licence by a one-time fee - see
|
||||
* \ref Page_Licence for more details (<b>Note: Please do NOT pay this in advance through the donation link below -
|
||||
* contact author for payment details.</b>).
|
||||
*
|
||||
* \image html "http://www.pledgie.com/campaigns/6927.png?skin_name=chrome"
|
||||
* <a href='http://www.pledgie.com/campaigns/6927'>Donate to this project via PayPal</a> - Thanks in Advance!
|
||||
*/
|
||||
|
||||
|
|
@ -13,7 +13,8 @@
|
|||
* for a one-time US$1500 payment. This provides a non-exclusive modified MIT licensed which
|
||||
* allows for the free use of the LUFA library, bootloaders and (where the sole copyright
|
||||
* is attributed to Dean Camera) demos without public disclosure within an organisation. Please
|
||||
* contact the author for more information.
|
||||
* contact the author for more information (<b>Note: Please do NOT pay this in advance through the
|
||||
* donation link shown on \ref Page_Donating - contact author for payment details.</b>).
|
||||
*
|
||||
* \verbatim
|
||||
* Permission to use, copy, modify, and distribute this software
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
* are used within the LUFA demos, and thus may be re-used by derivations of each demo. Free PID values may be
|
||||
* used by future LUFA demo projects.
|
||||
*
|
||||
* <b>These VID/PID values should not be used in commercial designs under any circumstances.>/b> Private projects
|
||||
* <b>These VID/PID values should not be used in commercial designs under any circumstances.</b> Private projects
|
||||
* may use the following values freely, but must accept any collisions due to other LUFA derived private projects
|
||||
* sharing identical values. It is suggested that private projects using interfaces compatible with existing
|
||||
* demos share the save VID/PID value.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue