本文主要是介绍uefi edk2 socket 实现,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
edk2 里面有个叫socket.c 的文件,里面实现了socket
//// Initialize the socket protocol//pSocket->Signature = SOCKET_SIGNATURE;pSocket->SocketProtocol.pfnAccept = EslSocketAccept;pSocket->SocketProtocol.pfnBind = EslSocketBind;pSocket->SocketProtocol.pfnClosePoll = EslSocketClosePoll;pSocket->SocketProtocol.pfnCloseStart = EslSocketCloseStart;pSocket->SocketProtocol.pfnConnect = EslSocketConnect;pSocket->SocketProtocol.pfnGetLocal = EslSocketGetLocalAddress;pSocket->SocketProtocol.pfnGetPeer = EslSocketGetPeerAddress;pSocket->SocketProtocol.pfnListen = EslSocketListen;pSocket->SocketProtocol.pfnOptionGet = EslSocketOptionGet;pSocket->SocketProtocol.pfnOptionSet = EslSocketOptionSet;pSocket->SocketProtocol.pfnPoll = EslSocketPoll;pSocket->SocketProtocol.pfnReceive = EslSocketReceive;pSocket->SocketProtocol.pfnShutdown = EslSocketShutdown;pSocket->SocketProtocol.pfnSocket = EslSocket;pSocket->SocketProtocol.pfnTransmit = EslSocketTransmit;pSocket->MaxRxBuf = MAX_RX_DATA;pSocket->MaxTxBuf = MAX_TX_DATA;//// Install the socket protocol on the specified handle//Status = gBS->InstallMultipleProtocolInterfaces (pChildHandle,&gEfiSocketProtocolGuid,&pSocket->SocketProtocol,NULL);
这篇关于uefi edk2 socket 实现的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!