ObjFW  History of src/OFDDPSocket.m of merge-in:dc1ba05

History of file src/OFDDPSocket.m at check-in merge-in:dc1ba05

2024-08-21
20:14
Make ObjFW compile on macOS/PowerPC 64 file: [542fe8e394] check-in: [7b0cd744dc] user: js, branch: trunk, size: 7765 [annotate] [blame] [check-ins using] [diff]
2024-04-29
21:42
Properly hide private symbols file: [ff7f44acd0] check-in: [f16bccc7b3] user: js, branch: trunk, size: 7754 [annotate] [blame] [check-ins using] [diff]
2024-04-03
02:16
Change license to LGPLv3 only file: [9c71163b23] check-in: [7413a728a7] user: js, branch: trunk, size: 7747 [annotate] [blame] [check-ins using] [diff]
2024-01-02
17:17
Update copyright file: [eb08afcb9b] check-in: [26ddd2e4e4] user: js, branch: trunk, size: 7539 [annotate] [blame] [check-ins using] [diff]
2023-05-21
13:10
Remove support for configuring AppleTalk

This didn't work without problems on all OSes. Since ofatalkcfg is no
longer there, there is no reason to keep this for now. In the future, if
there is a more generic replacement for ofatalkcfg, this can just be
reverted. file: [0f90d0e13f] check-in: [550bd1b7bb] user: js, branch: trunk, size: 7539 [annotate] [blame] [check-ins using] [diff]

2023-05-20
16:35
OFDDPSocket: Fix compilation on FreeBSD 10 file: [2eb53d96c3] check-in: [9da54e797f] user: js, branch: trunk, size: 13381 [annotate] [blame] [check-ins using] [diff]
2023-04-16
06:21
OFDDPSocket: Fix removing configuration on NetBSD file: [55ed0932ea] check-in: [22fab9e495] user: js, branch: trunk, size: 13365 [annotate] [blame] [check-ins using] [diff]
2023-04-15
17:30
OFDDPSocket: Add support for configuring AppleTalk file: [ac9c1835dc] check-in: [ccb53db0d8] user: js, branch: trunk, size: 13127 [annotate] [blame] [check-ins using] [diff]
2023-01-06
09:04
Update copyright file: [00da26e5f2] check-in: [8939cbdb52] user: js, branch: trunk, size: 7257 [annotate] [blame] [check-ins using] [diff]
2022-12-27
13:58
Rename OFAlready{Connected -> Open}Exception file: [d769c899b6] check-in: [29a41e5a78] user: js, branch: trunk, size: 7257 [annotate] [blame] [check-ins using] [diff]
2022-11-06
21:37
Fix OFDDPSocket on NetBSD

While Linux just ignores the protocol, NetBSD insists on it being 0.
Since this code path was also used by Windows, which requires it to be
ATPROTO_BASE + protocol, this means an extra code path for Windows is
needed now. file: [d532fdd70f] check-in: [4d97d89c32] user: js, branch: trunk, size: 7267 [annotate] [blame] [check-ins using] [diff]

20:31
OFDatagramSocket: Make sender nullable file: [f84809166c] check-in: [6ed8be900e] user: js, branch: trunk, size: 7171 [annotate] [blame] [check-ins using] [diff]
2022-11-03
00:14
OFDDPSocket: Don't include the type with the data

This seems to be an oddity limited to OSes that have implemented DDP
exclusively for netatalk, while macOS and Windows don't include it with
the data.

While on macOS it's possible to achieve the previous behavior via some
hacks, this is impossible on Windows, so the proper approach is to
handle it like everybody else: Specify the protocol type when binding
and only handle packets of the correct protocol type. file: [11bd6fb256] check-in: [9c2f20e736] user: js, branch: trunk, size: 7082 [annotate] [blame] [check-ins using] [diff]

2022-11-01
23:23
OFDDPSocket: Return correct bound address on macOS file: [5573556d55] check-in: [e5075e42ab] user: js, branch: trunk, size: 6316 [annotate] [blame] [check-ins using] [diff]
22:18
Implement OFDDPSocket using SOCK_RAW on macOS

This required quite some reverse engineering, as it is all completely
undocumented.

Receiving worked pretty much as expected: Do a readv() and get the raw
DDP packet including headers, then parse the headers ourselves to get
the source and fill out an OFSocketAddress.

But sending was tricky and required reading through kernel sources.
writev() does not work on a raw DDP socket and always fails with
EDESTADDRREQ, even if the destination address is provided as part of the
raw DDP packet. Meanwhile, sendmsg() always creates a DDP packet for us,
even in raw mode, and prepends the data with what it believes to be the
DDP protocol type (the protocol parameter passed to socket()). After
reading through the kernel source for some time to find a way to disable
this behavior, I found that you can set DDP_HDRINCL in ATPROTO_NONE to
provide your entire header to sendmsg() instead to work around this,
making it behave like you would expect from a writev() to a raw socket.

The only missing part now is to return a proper address a socket was
bound to, as currently it just leaves network and node at 0 and only
fills the port. This probably just requires some more reading of kernel
sources. file: [0702a801d8] check-in: [41535b41da] user: js, branch: trunk, size: 5781 [annotate] [blame] [check-ins using] [diff]

2022-10-30
18:58
Deleted: Remove AppleTalk support again

It seems that neither Windows nor macOS support DDP sockets, but only
the layers on top, while neither Linux nor NetBSD support the layers on
top, but only provide DDP.

It seems that DDP is not meant to be used directly, while Linux and
NetBSD only provide the minimum to use netatalk, which is DDP. ObjFW
would need to use the layers on top on Windows and macOS and implement
those layers itself on Linux and NetBSD. This also means that no code
would be shared between Linux / NetBSD and Windows / macOS, as it's
impossible to have one implementation that works for everything. At this
point, the effort required doesn't make sense. check-in: [0b4f713964] user: js, branch: trunk, size: 0

2022-10-25
21:30
OFDDPSocket: Don't include node in bind file: [c23e962b99] check-in: [607d4d083c] user: js, branch: trunk, size: 2715 [annotate] [blame] [check-ins using] [diff]
2022-10-22
18:32
OFDDPSocket: Bind with network, node & port file: [b54a9f63cf] check-in: [707206e796] user: js, branch: appletalk, size: 2828 [annotate] [blame] [check-ins using] [diff]
18:21
Merge trunk into branch "appletalk" file: [d78813a978] check-in: [ec6ee4c269] user: js, branch: appletalk, size: 2586 [annotate] [blame] [check-ins using] [diff]
14:16
Added: Add OFDDPSocket file: [ff6c9b4b71] check-in: [cb1fd0fbb8] user: js, branch: appletalk, size: 2532 [annotate] [blame] [check-ins using]