Differences From Artifact [d532fdd70f]:
- File
src/OFDDPSocket.m
— part of check-in
[4d97d89c32]
at
2022-11-06 21:37:11
on branch trunk
— 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. (user: js, size: 7267) [annotate] [blame] [check-ins using] [more...]
To Artifact [0f90d0e13f]:
- File
src/OFDDPSocket.m
— part of check-in
[550bd1b7bb]
at
2023-05-21 13:10:40
on branch trunk
— 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. (user: js, size: 7539) [annotate] [blame] [check-ins using] [more...]
1 | /* | | | 1 2 3 4 5 6 7 8 9 | /* * Copyright (c) 2008-2023 Jonathan Schleifer <js@nil.im> * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE.QPL included in * the packaging of this file. * |
︙ | ︙ | |||
18 19 20 21 22 23 24 25 26 27 | #include <errno.h> #ifdef HAVE_FCNTL_H # include <fcntl.h> #endif #import "OFDDPSocket.h" #import "OFSocket.h" #import "OFSocket+Private.h" | > > > | > > > > > > > > > > | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | #include <errno.h> #ifdef HAVE_FCNTL_H # include <fcntl.h> #endif #import "OFDDPSocket.h" #import "OFDictionary.h" #import "OFNumber.h" #import "OFPair.h" #import "OFSocket.h" #import "OFSocket+Private.h" #import "OFAlreadyOpenException.h" #import "OFBindDDPSocketFailedException.h" #import "OFGetOptionFailedException.h" #import "OFInvalidArgumentException.h" #import "OFNotOpenException.h" #import "OFOutOfRangeException.h" #import "OFReadFailedException.h" #import "OFSetOptionFailedException.h" #import "OFWriteFailedException.h" #ifdef HAVE_NET_IF_H # include <net/if.h> #endif #ifdef HAVE_SYS_IOCTL_H # include <sys/ioctl.h> #endif #ifdef OF_HAVE_NETAT_APPLETALK_H # include <netat/ddp.h> # include <sys/ioctl.h> /* Unfortulately, there is no struct for the following in userland headers */ struct ATInterfaceConfig { |
︙ | ︙ | |||
63 64 65 66 67 68 69 | int flags; #endif if (protocolType == 0) @throw [OFInvalidArgumentException exception]; if (_socket != OFInvalidSocketHandle) | | | 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | int flags; #endif if (protocolType == 0) @throw [OFInvalidArgumentException exception]; if (_socket != OFInvalidSocketHandle) @throw [OFAlreadyOpenException exceptionWithObject: self]; address = OFSocketAddressMakeAppleTalk(network, node, port); #if defined(OF_MACOS) if ((_socket = socket(address.sockaddr.at.sat_family, SOCK_RAW | SOCK_CLOEXEC, protocolType)) == OFInvalidSocketHandle) #elif defined(OF_WINDOWS) |
︙ | ︙ |