/device/generic/goldfish/wifi/ipv6proxy/ |
D | socket.cpp | 60 Result Socket::open(int domain, int type, int protocol) { in open() 62 return Result::error("open called on socket in invalid state"); in open() 66 return Result::error(strerror(errno)); in open() 69 return Result::success(); in open() 72 Result Socket::setInterface(const std::string& interface) { in setInterface() 74 return Result::error("attempting to set option in invalid state"); in setInterface() 79 return res == -1 ? Result::error(strerror(errno)) : Result::success(); in setInterface() 82 Result Socket::setMulticastHopLimit(int hopLimit) { in setMulticastHopLimit() 84 return Result::error("attempting to set option in invalid state"); in setMulticastHopLimit() 89 return res == -1 ? Result::error(strerror(errno)) : Result::success(); in setMulticastHopLimit() [all …]
|
D | socket.h | 64 Result open(int domain, int type, int protocol); 70 Result setInterface(const std::string& interface); 75 Result setMulticastHopLimit(int hopLimit); 80 Result setUnicastHopLimit(int hopLimit); 85 Result setTransparent(bool transparent); 89 Result bind(const Address& address); 93 Result receive(Message* receivingMessage); 94 Result receiveFrom(Message* receivingMessage, Address* from); 96 Result send(const void* data, size_t size); 99 Result sendTo(const sockaddr& destination, [all …]
|
D | result.h | 18 class Result { 20 static Result success() { in success() 21 return Result(true); in success() 26 static Result error(const char* message) { in error() 27 return Result(message); in error() 35 explicit Result(bool success) : mSuccess(success) { } in Result() function 36 explicit Result(const char* message) in Result() function
|
/device/generic/goldfish/dhcp/client/ |
D | interface.cpp | 36 Result Interface::init(const char* interfaceName) { in init() 40 return Result::error("Interface initialized more than once"); in init() 45 return Result::error("Failed to create interface socket for '%s': %s", in init() 49 Result res = populateIndex(); in init() 69 return Result::success(); in init() 72 Result Interface::bringUp() { in bringUp() 76 Result Interface::bringDown() { in bringDown() 80 Result Interface::setMtu(uint16_t mtu) { in setMtu() 87 return Result::error("Failed to set interface MTU %u for '%s': %s", in setMtu() 93 return Result::success(); in setMtu() [all …]
|
D | interface.h | 31 Result init(const char* interfaceName); 40 Result bringUp(); 41 Result bringDown(); 42 Result setMtu(uint16_t mtu); 43 Result setAddress(in_addr_t address); 44 Result setSubnetMask(in_addr_t subnetMask); 48 Result populateIndex(); 49 Result populateMacAddress(); 50 Result setInterfaceUp(bool shouldBeUp);
|
/device/linaro/bootloader/edk2/StdLib/LibC/StdLib/ |
D | NumericInt.c | 187 long Result = 0; in strtol() local 236 Previous = Result; in strtol() 237 Result = (Result * base) + (long int)temp; in strtol() 238 if( Result <= Previous) { // Detect Overflow in strtol() 240 Result = LONG_MIN; in strtol() 243 Result = LONG_MAX; in strtol() 252 Result = -Result; in strtol() 259 return Result; in strtol() 276 unsigned long Result = 0; in strtoul() local 319 Previous = Result; in strtoul() [all …]
|
/device/linaro/bootloader/edk2/ArmPkg/Library/SemihostLib/ |
D | SemihostLib.c | 38 INT32 Result; in SemihostFileOpen() local 53 Result = Semihost_SYS_OPEN(&OpenBlock); in SemihostFileOpen() 55 if (Result == -1) { in SemihostFileOpen() 58 *FileHandle = Result; in SemihostFileOpen() 70 INT32 Result; in SemihostFileSeek() local 75 Result = Semihost_SYS_SEEK(&SeekBlock); in SemihostFileSeek() 79 if (Result < 0) { in SemihostFileSeek() 94 UINT32 Result; in SemihostFileRead() local 104 Result = Semihost_SYS_READ(&ReadBlock); in SemihostFileRead() 106 if ((*Length != 0) && (Result == *Length)) { in SemihostFileRead() [all …]
|
/device/linaro/bootloader/edk2/MdePkg/Library/BasePciCf8Lib/ |
D | PciCf8Lib.c | 119 UINT8 Result; in PciCf8Read8() local 125 Result = IoRead8 (PCI_CONFIGURATION_DATA_PORT + (UINT16)(Address & 3)); in PciCf8Read8() 128 return Result; in PciCf8Read8() 157 UINT8 Result; in PciCf8Write8() local 163 Result = IoWrite8 ( in PciCf8Write8() 169 return Result; in PciCf8Write8() 202 UINT8 Result; in PciCf8Or8() local 208 Result = IoOr8 ( in PciCf8Or8() 214 return Result; in PciCf8Or8() 247 UINT8 Result; in PciCf8And8() local [all …]
|
/device/linaro/bootloader/edk2/BaseTools/Source/Python/UPT/UnitTest/ |
D | CommentGeneratingUnitTest.py | 60 Result = _GetHelpStr(HelpTextList) 61 self.assertEqual(Result, HelpStr) 81 Result = _GetHelpStr(HelpTextList) 82 self.assertEqual(Result, ExpectedStr) 102 Result = _GetHelpStr(HelpTextList) 103 self.assertEqual(Result, ExpectedStr) 122 Result = _GetHelpStr(HelpTextList) 123 self.assertEqual(Result, ExpectedStr) 148 Result = _GetHelpStr(HelpTextList) 149 self.assertEqual(Result, ExpectedStr) [all …]
|
/device/linaro/bootloader/edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/ |
D | String.c | 655 UINTN Result; in StrDecimalToUintn() local 675 Result = 0; in StrDecimalToUintn() 682 ASSERT ((Result < QUIENT_MAX_UINTN_DIVIDED_BY_10) || in StrDecimalToUintn() 683 ((Result == QUIENT_MAX_UINTN_DIVIDED_BY_10) && in StrDecimalToUintn() 687 Result = Result * 10 + (*String - L'0'); in StrDecimalToUintn() 691 return Result; in StrDecimalToUintn() 735 UINT64 Result; in StrDecimalToUint64() local 755 Result = 0; in StrDecimalToUint64() 762 ASSERT ((Result < QUIENT_MAX_UINT64_DIVIDED_BY_10) || in StrDecimalToUint64() 763 ((Result == QUIENT_MAX_UINT64_DIVIDED_BY_10) && in StrDecimalToUint64() [all …]
|
/device/linaro/bootloader/edk2/BaseTools/Source/Python/Ecc/ |
D | c.py | 493 for Result in ResultSet: 494 TimeValue = Result[0] 564 for Result in ResultSet: 568 FileID = Result[0] 817 for Result in ResultSet: 818 if Result[0] < ExpLine and Result[1] > ExpLine: 819 return Result 869 for Result in ResultSet: 870 if len(Result[0]) == 0: 871 Dict[Result[1]] = Result[2] [all …]
|
/device/generic/goldfish/dhcp/common/ |
D | result.h | 23 class Result { 25 static Result success() { in success() 26 return Result(true); in success() 29 static Result error(std::string message) { in error() 30 return Result(message); in error() 32 static Result error(const char* format, ...) { in error() 39 return Result(std::string(buffer)); in error() 47 explicit Result(bool success) : mSuccess(success) { } in Result() function 48 explicit Result(std::string message) in Result() function
|
D | socket.h | 36 Result open(int domain, int type, int protocol); 38 Result bind(const void* sockaddr, size_t sockaddrLength); 40 Result bindIp(in_addr_t address, uint16_t port); 42 Result bindRaw(unsigned int interfaceIndex); 46 Result sendOnInterface(unsigned int interfaceIndex, 54 Result sendRawUdp(in_addr_t source, 62 Result receiveFromInterface(Message* message, unsigned int* interfaceIndex); 69 Result receiveRawUdp(uint16_t expectedPort, 74 Result enableOption(int level, int optionName);
|
D | socket.cpp | 75 Result Socket::open(int domain, int type, int protocol) { in open() 77 return Result::error("Socket already open"); in open() 81 return Result::error("Failed to open socket: %s", strerror(errno)); in open() 83 return Result::success(); in open() 86 Result Socket::bind(const void* sockaddr, size_t sockaddrLength) { in bind() 88 return Result::error("Socket not open"); in bind() 95 return Result::error("Unable to bind raw socket: %s", strerror(errno)); in bind() 98 return Result::success(); in bind() 101 Result Socket::bindIp(in_addr_t address, uint16_t port) { in bindIp() 111 Result Socket::bindRaw(unsigned int interfaceIndex) { in bindRaw() [all …]
|
/device/generic/goldfish/network/netmgr/ |
D | result.h | 23 class Result { 25 static Result success() { in success() 26 return Result(true); in success() 29 static Result error(std::string message) { in error() 30 return Result(message); in error() 32 static Result error(const char* format, ...) { in error() 39 return Result(std::string(buffer)); in error() 47 explicit Result(bool success) : mSuccess(success) { } in Result() function 48 explicit Result(std::string message) in Result() function
|
/device/generic/goldfish/network/netmgr/commands/ |
D | wifi_command.cpp | 94 Result WifiCommand::onCommand(const char* /*command*/, const char* args) { in onCommand() 98 return Result::error("Invalid wifi command '%s'", args); in onCommand() 103 return Result::error("Empty wifi command"); in onCommand() 109 return Result::error("Missing argument to command '%s'", in onCommand() 120 return Result::error("Unknown wifi command '%s'", subCommand.c_str()); in onCommand() 127 Result WifiCommand::writeConfig() { in writeConfig() 130 return Result::error("Config failure: could not open template: %s", in writeConfig() 136 return Result::error("Config failure: could not open target: %s", in writeConfig() 144 return Result::error("Config failure: Error reading template: %s", in writeConfig() 150 return Result::error("Config failure: Error writing target: %s", in writeConfig() [all …]
|
D | wifi_command.h | 32 Result onCommand(const char* command, const char* args) override; 35 Result writeConfig(); 36 Result triggerHostApd(); 37 Result setBlocked(const char* ifName, bool blocked); 39 Result onAdd(const std::vector<std::string>& args); 40 Result onBlock(const std::vector<std::string>& args); 41 Result onUnblock(const std::vector<std::string>& args);
|
/device/linaro/bootloader/edk2/MdePkg/Library/BaseLib/ |
D | String.c | 658 UINTN Result; in StrDecimalToUintn() local 680 Result = 0; in StrDecimalToUintn() 687 ASSERT (Result <= ((((UINTN) ~0) - (*String - L'0')) / 10)); in StrDecimalToUintn() 689 Result = Result * 10 + (*String - L'0'); in StrDecimalToUintn() 693 return Result; in StrDecimalToUintn() 737 UINT64 Result; in StrDecimalToUint64() local 759 Result = 0; in StrDecimalToUint64() 766 ASSERT (Result <= DivU64x32 (((UINT64) ~0) - (*String - L'0') , 10)); in StrDecimalToUint64() 768 Result = MultU64x32 (Result, 10) + (*String - L'0'); in StrDecimalToUint64() 772 return Result; in StrDecimalToUint64() [all …]
|
/device/linaro/bootloader/edk2/MdePkg/Library/UefiUsbLib/ |
D | Hid.c | 60 EFI_STATUS Result; in UsbGetHidDescriptor() local 72 Result = UsbIo->UsbControlTransfer ( in UsbGetHidDescriptor() 82 return Result; in UsbGetHidDescriptor() 117 EFI_STATUS Result; in UsbGetReportDescriptor() local 132 Result = UsbIo->UsbControlTransfer ( in UsbGetReportDescriptor() 142 return Result; in UsbGetReportDescriptor() 172 EFI_STATUS Result; in UsbGetProtocolRequest() local 187 Result = UsbIo->UsbControlTransfer ( in UsbGetProtocolRequest() 197 return Result; in UsbGetProtocolRequest() 227 EFI_STATUS Result; in UsbSetProtocolRequest() local [all …]
|
/device/linaro/bootloader/edk2/OvmfPkg/Library/QemuFwCfgLib/ |
D | QemuFwCfgLib.c | 252 UINT8 Result; in QemuFwCfgRead8() local 254 QemuFwCfgReadBytes (sizeof (Result), &Result); in QemuFwCfgRead8() 256 return Result; in QemuFwCfgRead8() 272 UINT16 Result; in QemuFwCfgRead16() local 274 QemuFwCfgReadBytes (sizeof (Result), &Result); in QemuFwCfgRead16() 276 return Result; in QemuFwCfgRead16() 292 UINT32 Result; in QemuFwCfgRead32() local 294 QemuFwCfgReadBytes (sizeof (Result), &Result); in QemuFwCfgRead32() 296 return Result; in QemuFwCfgRead32() 312 UINT64 Result; in QemuFwCfgRead64() local [all …]
|
/device/generic/goldfish/dhcp/server/ |
D | dhcpserver.cpp | 43 Result DhcpServer::init() { in init() 44 Result res = mSocket.open(AF_INET, SOCK_DGRAM, IPPROTO_UDP); in init() 62 return Result::success(); in init() 65 Result DhcpServer::run() { in run() 75 return Result::error("Unable to fill signal set: %s", strerror(errno)); in run() 79 return Result::error("Unable to set signal mask: %s", strerror(errno)); in run() 93 Result res = mSocket.receiveFromInterface(&message, in run() 125 return Result::error("Polling failed: %s", strerror(errno)); in run() 128 Result DhcpServer::sendMessage(unsigned int interfaceIndex, in sendMessage() 143 Result res = getOfferAddress(interfaceIndex, in sendDhcpOffer() [all …]
|
D | dhcpserver.h | 37 Result init(); 38 Result run(); 41 Result sendMessage(unsigned int interfaceIndex, 52 Result getInterfaceData(unsigned int interfaceIndex, 55 Result getInterfaceAddress(unsigned int interfaceIndex, 57 Result getInterfaceNetmask(unsigned int interfaceIndex, 59 Result getOfferAddress(unsigned int interfaceIndex,
|
/device/linaro/bootloader/edk2/BaseTools/Source/C/Common/ |
D | OsPath.c | 239 CHAR8 *Result; in OsPathPeerFilePath() local 242 Result = (CHAR8 *) malloc (strlen (OldPath) + strlen (Peer) + 1); in OsPathPeerFilePath() 243 if (Result == NULL) { in OsPathPeerFilePath() 247 strcpy (Result, OldPath); in OsPathPeerFilePath() 253 for (Offset = strlen (Result); Offset >= 0; Offset--) { in OsPathPeerFilePath() 254 if ((Result[Offset] == '/') || (Result[Offset] == '\\')) { in OsPathPeerFilePath() 255 Result[Offset + 1] = '\0'; in OsPathPeerFilePath() 256 strcat (Result, Peer); in OsPathPeerFilePath() 257 return Result; in OsPathPeerFilePath() 264 strcpy (Result, Peer); in OsPathPeerFilePath() [all …]
|
/device/google/contexthub/contexthubhal/ |
D | NanohubHidlAdapter.cpp | 131 Return<Result> Contexthub::sendMessageToHub(uint32_t hubId, in sendMessageToHub() 134 return Result::BAD_PARAMS; in sendMessageToHub() 156 return Result::TRANSACTION_FAILED; in sendMessageToHub() 159 return Result::OK; in sendMessageToHub() 162 Return<Result> Contexthub::registerCallback(uint32_t hubId, in registerCallback() 164 Return<Result> retVal = Result::BAD_PARAMS; in registerCallback() 168 retVal = Result::BAD_PARAMS; in registerCallback() 188 retVal = Result::OK; in registerCallback() 194 retVal = Result::UNKNOWN_FAILURE; in registerCallback() 354 Return<Result> Contexthub::unloadNanoApp(uint32_t hubId, in unloadNanoApp() [all …]
|
/device/linaro/bootloader/edk2/ArmVirtPkg/Library/QemuFwCfgLib/ |
D | QemuFwCfgLib.c | 370 UINT8 Result; in QemuFwCfgRead8() local 372 QemuFwCfgReadBytes (sizeof Result, &Result); in QemuFwCfgRead8() 373 return Result; in QemuFwCfgRead8() 389 UINT16 Result; in QemuFwCfgRead16() local 391 QemuFwCfgReadBytes (sizeof Result, &Result); in QemuFwCfgRead16() 392 return Result; in QemuFwCfgRead16() 408 UINT32 Result; in QemuFwCfgRead32() local 410 QemuFwCfgReadBytes (sizeof Result, &Result); in QemuFwCfgRead32() 411 return Result; in QemuFwCfgRead32() 427 UINT64 Result; in QemuFwCfgRead64() local [all …]
|