当前位置: 代码迷 >> 综合 >> uefi edk2 socket 实现
  详细解决方案

uefi edk2 socket 实现

热度:48   发布时间:2023-12-14 22:31:08.0

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);

  相关解决方案