Overview
Comment: | Add OFSocketAddressDescription() |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
a8c9d73327b853548394c1268315bfff |
User & Date: | js on 2023-10-22 21:45:53 |
Other Links: | manifest | tags |
Context
2023-10-22
| ||
21:47 | Fix OFSocketAddressString() for AppleTalk check-in: 4056d5e2b6 user: js tags: trunk | |
21:45 | Add OFSocketAddressDescription() check-in: a8c9d73327 user: js tags: trunk | |
2023-10-21
| ||
20:52 | +[networkInterfaces]: Use index as key on Windows check-in: ad9452c908 user: js tags: trunk | |
Changes
Modified src/OFSocket.h from [39b53adb69] to [346d4cc46a].
︙ | |||
286 287 288 289 290 291 292 | 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 | - + + + + + + + + + + + + | extern unsigned long OFSocketAddressHash( const OFSocketAddress *_Nonnull address); /** * @brief Converts the specified @ref OFSocketAddress to a string. * * @param address The address to convert to a string |
︙ |
Modified src/OFSocket.m from [0cd5c67cfd] to [c153f444b0].
︙ | |||
985 986 987 988 989 990 991 992 993 994 995 996 997 998 | 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | return IPXString(address); case OFSocketAddressFamilyAppleTalk: return appleTalkString(address); default: @throw [OFInvalidArgumentException exception]; } } OFString * OFSocketAddressDescription(const OFSocketAddress *address) { switch (address->family) { case OFSocketAddressFamilyIPv4: return [OFString stringWithFormat: @"%@:%" PRIu16, IPv4String(address), OFSocketAddressIPPort(address)]; case OFSocketAddressFamilyIPv6: return [OFString stringWithFormat: @"[%@]:%" PRIu16, IPv6String(address), OFSocketAddressIPPort(address)]; case OFSocketAddressFamilyIPX: return [OFString stringWithFormat: @"%@.%" PRIX16, IPXString(address), OFSocketAddressIPXPort(address)]; case OFSocketAddressFamilyAppleTalk: return [OFString stringWithFormat: @"%@." PRIu8, appleTalkString(address), OFSocketAddressAppleTalkPort(address)]; default: return OFSocketAddressString(address); } } void OFSocketAddressSetIPPort(OFSocketAddress *address, uint16_t port) { switch (address->family) { case OFSocketAddressFamilyIPv4: address->sockaddr.in.sin_port = OFToBigEndian16(port); |
︙ |