|
wavelength 1.0.0
|
The Libnet module serves the inet and inetctl libraries to the EE through a multi-client SIF RPC server. More...
#include <libnetb.h>

Public Types | |
| enum | Function { kFunctionInet6 = 1 , kFunctionInet7 = 2 , kFunctionInet8 = 3 , kFunctionRecv = 4 , kFunctionSend = 5 , kFunctionName2Address = 6 , kFunctionAddress2String = 7 , kFunctionInet24 = 8 , kFunctionInterfaceControl = 9 , kFunctionInet27 = 10 , kFunctionInet30 = 11 , kFunctionInet36 = 12 , kFunctionRecvFrom = 13 , kFunctionSendTo = 14 , kFunctionInet11 = 15 , kFunctionInet41 = 16 , kFunctionInet38 = 17 , kFunctionInet14 = 18 , kFunctionControl = 19 , kFunctionInet16 = 20 , kFunctionOpenEvents = 30 , kFunctionCloseEvents = 31 , kFunctionInetCtl4 = 32 , kFunctionWaitInterfaceUp = 33 , kFunctionWaitInterfaceDown = 34 , kFunctionGetEvent = 35 , kFunctionInetCtl5 = 50 , kFunctionInetCtl6 = 51 , kFunctionInetCtl7 = 52 , kFunctionGetState = 53 , kFunctionStartAsyncRead = 100 , kFunctionStartAsyncSend = 101 , kFunctionCloseAsync = 102 , kFunctionDumpState = 103 } |
| RPC function numbers, with the record types of their arguments and replies. More... | |
Static Public Member Functions | |
| static int | SendToEe (const void *data, void *destination, int size) |
| Copy a buffer to EE memory by SIF DMA and wait for the transfer. | |
| static void | PrintInetError (int error) |
| Print an inet error code and its description. | |
| static int | CreateNamedThread (ThreadParam *param, const char *name, void(*entry)(void *), int stackSize, int priority, void *argument) |
| Create and start a thread with an argument. | |
| static const char * | GetVersion () |
| Read the version text. | |
| static bool | FormatBuildDate (char *text, int size) |
| Write the build date and time as MM.DD.YYYY.hh.mm.ss. | |
| static void | PrintSendDelay () |
| Print the delay between sends. | |
| static void | ParseArguments (int argc, char **argv) |
| Read the module arguments into sConfig. | |
| static int | StartRpcThread () |
| Start the thread that registers the RPC server. | |
Static Public Attributes | |
| static constexpr unsigned int | kRpcServerId = 0x80001201 |
| SIF RPC server identifier of the module. | |
| static int | sVerbose |
| Nonzero for messages about each event and retry. | |
| static const char * | sVersion |
| Version text. | |
| static int | sSendDelay |
| Microseconds between sends. | |
| static LibnetConfig | sConfig |
| Settings from the module arguments. | |
The Libnet module serves the inet and inetctl libraries to the EE through a multi-client SIF RPC server.
Most RPC functions forward one library call. Others queue the inetctl events and run asynchronous transfers on connections (see AsyncInfo). Its arguments are -verbose and -send_delay=<milliseconds>.
The module was built without RTTI. The name comes from the module's library name.
| enum Libnet::Function |
RPC function numbers, with the record types of their arguments and replies.
| Enumerator | |
|---|---|
| kFunctionInet6 | LibnetParamArgs to inet_6(). |
| kFunctionInet7 | LibnetConnectionArgs to inet_7(). |
| kFunctionInet8 | LibnetConnectionArgs to inet_8(). |
| kFunctionRecv | |
| kFunctionSend | |
| kFunctionName2Address | |
| kFunctionAddress2String | |
| kFunctionInet24 | |
| kFunctionInterfaceControl | |
| kFunctionInet27 | |
| kFunctionInet30 | |
| kFunctionInet36 | LibnetValueArgs to inet_36(). |
| kFunctionRecvFrom | |
| kFunctionSendTo | |
| kFunctionInet11 | LibnetConnectionArgs to inet_11(). |
| kFunctionInet41 | No arguments, to inet_41(). |
| kFunctionInet38 | |
| kFunctionInet14 | LibnetInet14Args to inet_14(). |
| kFunctionControl | |
| kFunctionInet16 | |
| kFunctionOpenEvents | Start queueing the inetctl events. |
| kFunctionCloseEvents | Stop queueing the inetctl events. |
| kFunctionInetCtl4 | LibnetEnvArgs to inetctl_4(). |
| kFunctionWaitInterfaceUp | Wait for InetEventQueue::kInterfaceUp. |
| kFunctionWaitInterfaceDown | Wait for InetEventQueue::kInterfaceDown. |
| kFunctionGetEvent | |
| kFunctionInetCtl5 | LibnetValueArgs to inetctl_5(). |
| kFunctionInetCtl6 | LibnetValueArgs to inetctl_6(). |
| kFunctionInetCtl7 | LibnetValueArgs to inetctl_7(). |
| kFunctionGetState | |
| kFunctionStartAsyncRead | An AsyncInfo to receive with. |
| kFunctionStartAsyncSend | An AsyncInfo to send with. |
| kFunctionCloseAsync | |
| kFunctionDumpState | Print the state of the module. |
|
static |
Copy a buffer to EE memory by SIF DMA and wait for the transfer.
| data | Source. |
| destination | Destination in EE memory. |
| size | Byte count. |
|
static |
Print an inet error code and its description.
| error | A #sceInetError, or a nonnegative value for no error. |
|
static |
Create and start a thread with an argument.
| param | Parameters with the attribute and the option set. |
| name | Thread name for messages. |
| entry | Entry point. |
| stackSize | Stack size. |
| priority | Priority. |
| argument | Argument of the entry point. |
|
static |
Read the version text.
|
static |
Write the build date and time as MM.DD.YYYY.hh.mm.ss.
| text | Receives the text, or null. |
| size | Size of text. |
text is not null.
|
static |
Print the delay between sends.
|
static |
Read the module arguments into sConfig.
| argc | Argument count. |
| argv | Arguments. |
|
static |
Start the thread that registers the RPC server.
|
staticconstexpr |
SIF RPC server identifier of the module.
|
static |
Nonzero for messages about each event and retry.
Set by -verbose.
|
static |
Version text.
|
static |
Microseconds between sends.
|
static |
Settings from the module arguments.