Overview
Comment: | socket.m: Replace inet_{ntop,pton} with own impl
Not all OSes supported by ObjFW provide them. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
ab9810ef698f23037978cbc7c1546876 |
User & Date: | js on 2018-08-06 22:34:30 |
Other Links: | manifest | tags |
Context
2018-08-11
| ||
11:58 | OFDNSResolver: Minor refactoring check-in: 4afaa63320 user: js tags: trunk | |
2018-08-06
| ||
22:34 | socket.m: Replace inet_{ntop,pton} with own impl check-in: ab9810ef69 user: js tags: trunk | |
2018-08-05
| ||
20:00 | Add a few missing casts check-in: 4f49f55859 user: js tags: trunk | |
Changes
Modified src/socket.h from [f9393485f9] to [232e64699e].
︙ | |||
123 124 125 126 127 128 129 130 131 132 133 134 135 136 | 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | + + + + + + + + + + + + + + + + + + + + + + | * @param IP The IP to parse * @param port The port to use * @return The parsed IP and port as an of_socket_address_t */ extern of_socket_address_t of_socket_address_parse_ip( OFString *IP, uint16_t port); /*! * @brief Parses the specified IPv4 and port into an of_socket_address_t. * * @param IP The IPv4 to parse * @param port The port to use * @return The parsed IPv4 and port as an of_socket_address_t */ extern of_socket_address_t of_socket_address_parse_ipv4( OFString *IP, uint16_t port); #ifdef OF_HAVE_IPV6 /*! * @brief Parses the specified IPv6 and port into an of_socket_address_t. * * @param IP The IPv6 to parse * @param port The port to use * @return The parsed IPv6 and port as an of_socket_address_t */ extern of_socket_address_t of_socket_address_parse_ipv6( OFString *IP, uint16_t port); #endif /*! * @brief Compares two of_socket_address_t for equality. * * @param address1 The address to compare with the second address * @param address2 The second address * @return Whether the two addresses are equal */ |
︙ |
Modified src/socket.m from [06c3fc8fe2] to [2650e52f57].
︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | + + + | #ifdef OF_NINTENDO_3DS # include <malloc.h> /* For memalign() */ #endif #include <errno.h> #import "OFArray.h" #import "OFCharacterSet.h" #import "OFLocale.h" #import "OFString.h" #import "OFException.h" /* For some E* -> WSAE* defines */ #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" #import "OFLockFailedException.h" #import "OFUnlockFailedException.h" |
︙ | |||
219 220 221 222 223 224 225 | 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 | - - + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + | @throw [OFUnlockFailedException exception]; # endif return ret; } #endif |
︙ | |||
396 397 398 399 400 401 402 | 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 | - + + - - - + + + - + - + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - | } static OFString * IPv4String(const of_socket_address_t *address, uint16_t *port) { const struct sockaddr_in *addrIn = (const struct sockaddr_in *)&address->address; |
︙ |
Modified tests/Makefile from [6fc41de27b] to [62b4edb1f2].
︙ | |||
53 54 55 56 57 58 59 | 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | - + + | OFSHA224HashTests.m \ OFSHA256HashTests.m \ OFSHA384HashTests.m \ OFSHA512HashTests.m SRCS_PLUGINS = OFPluginTests.m SRCS_SOCKETS = OFKernelEventObserverTests.m \ OFTCPSocketTests.m \ |
︙ |
Added tests/SocketTests.m version [25f3a27b64].