
Jul 11 13:05:14 wolfalice python3[18424]: Exception in thread Thread-13 (_run):
Jul 11 13:05:14 wolfalice python3[18424]: Traceback (most recent call last):
Jul 11 13:05:14 wolfalice python3[18424]: File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
Jul 11 13:05:14 wolfalice python3[18424]: self.run()
Jul 11 13:05:14 wolfalice python3[18424]: File "/usr/lib/python3.11/threading.py", line 975, in run
Jul 11 13:05:14 wolfalice python3[18424]: self._target(*self._args, **self._kwargs)
Jul 11 13:05:14 wolfalice python3[18424]: File "/home/chris/src/tashrouter1/tashrouter/service/name_information.py", line 326, in _run
Jul 11 13:05:14 wolfalice python3[18424]: router.route(Datagram(hop_count=0,
Jul 11 13:05:14 wolfalice python3[18424]: File "/home/chris/src/tashrouter1/tashrouter/router/router.py", line 155, in route
Jul 11 13:05:14 wolfalice python3[18424]: entry.port.unicast(datagram.destination_network, datagram.destination_node, datagram)
Jul 11 13:05:14 wolfalice python3[18424]: File "/home/chris/src/tashrouter1/tashrouter/port/localtalk/__init__.py", line 167, in unicast
Jul 11 13:05:14 wolfalice python3[18424]: self._send_frame_with_short_header(node, datagram)
Jul 11 13:05:14 wolfalice python3[18424]: File "/home/chris/src/tashrouter1/tashrouter/port/localtalk/__init__.py", line 152, in _send_frame_with_short_header
Jul 11 13:05:14 wolfalice python3[18424]: self.send_frame(bytes((destination_node, self.node, self.LLAP_APPLETALK_SHORT_HEADER)) + datagram.as_short_header_bytes())
Jul 11 13:05:14 wolfalice python3[18424]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jul 11 13:05:14 wolfalice python3[18424]: File "/home/chris/src/tashrouter1/tashrouter/datagram.py", line 125, in as_short_header_bytes
Jul 11 13:05:14 wolfalice python3[18424]: raise ValueError('invalid hop count %d, short-header datagrams may not have non-zero hop count' % self.hop_count)
Jul 11 13:05:14 wolfalice python3[18424]: ValueError: invalid hop count 1, short-header datagrams may not have non-zero hop count
Hmm. So this is caused by LkupRouter routing a datagram that it's pretending it didn't originate, which means it'll have a hop count of 1, which means it can't be short-form... but it tries to make it short form and fails. I could solve this one of two ways:I spoke too soon. After that first print the IMII disappeared from the network. There are these errors:
The Apple IIe Workstation card won't have a problem with NBP requests in long DDP packets
Okay, this is what I did, it's been pushed to github - @fergycool, can you give this a try?I could force the generated LkUp-Reply to be a long-form DDP datagram
Besides the erroneous behavior of the AT ImageWriter and friends, are there any consequences of them being short form? TashRouter's Name Information Service broadcasts short-form DDP datagrams, and always has done, as far as I'm aware. I was resistant to force them to always be long-form (favoring the LkupRouter solution), but it's been long enough that I can't remember why exactly. Maybe I'll dig back into this thread and see if anything jogs my memory...Inside AppleTalk doesn't state that a router broadcasting local NBP lookup packets on routed non-extended networks need to be long form.
It defaults to 0.0.0.0, but you can change the interface address for LtoudpPort by passing theI also need to figure out how to route LToUDP over a different lan/interface other than the appletalk one.
intf_address argument to it, comme ça:router = Router('router', ports=(
LtoudpPort(seed_network=1, seed_zone_name=b'LToUDP Network', intf_address='1.2.3.4'),
MacvtapPort(macvtap_name='macvtap0', seed_network_min=3, seed_network_max=5, seed_zone_names=[b'EtherTalk Network']),
))
All seems to be good! I've tried on a few different Macintoshes connected via Localtalk and Ethertalk over a few hours. No errors in the Tashrouter log and all can print to the Imagewriter II with no issues. So it seems to fix all the problems I've seen! Nice.Okay, this is what I did, it's been pushed to github - @fergycool, can you give this a try?