From quozl at laptop.org Thu Mar 25 18:46:26 2021 From: quozl at laptop.org (James Cameron) Date: Fri, 26 Mar 2021 10:46:26 +1100 Subject: [netrek-dev] SELF_8FLAGS2 aka F_self_8flags2 Message-ID: <20210325234626.GA20653@laptop.org> I was cleaning up compiler warnings in a client and found the SELF_8FLAGS2 short packets feature that packs some of the me->p_flags into a byte does actually misalign the flags beyond the 32-bit width of the target variable. There's no implementation of the feature in my server code. Does anyone know of a server side implementation of SELF_8FLAGS2? I'm inclined to remove it rather than fix it without testing it. -- James Cameron https://quozl.linux.org.au/ From darrellroot at mac.com Thu Mar 25 19:37:23 2021 From: darrellroot at mac.com (Darrell Root) Date: Thu, 25 Mar 2021 17:37:23 -0700 Subject: [netrek-dev] SELF_8FLAGS2 aka F_self_8flags2 In-Reply-To: <20210325234626.GA20653@laptop.org> References: <20210325234626.GA20653@laptop.org> Message-ID: <59EA4B8B-9157-4FE2-A403-E11CED6FF168@mac.com> The Swift Netrek server does not implement short packets. So no impact to my server. Thanks for asking! Darrell > On Mar 25, 2021, at 4:46 PM, James Cameron wrote: > > I was cleaning up compiler warnings in a client and found the > SELF_8FLAGS2 short packets feature that packs some of the me->p_flags > into a byte does actually misalign the flags beyond the 32-bit width > of the target variable. > > There's no implementation of the feature in my server code. > > Does anyone know of a server side implementation of SELF_8FLAGS2? > > I'm inclined to remove it rather than fix it without testing it. > > -- > James Cameron > https://quozl.linux.org.au/ > _______________________________________________ > netrek-dev mailing list > netrek-dev at us.netrek.org > http://mailman.us.netrek.org/mailman/listinfo/netrek-dev From quozl at laptop.org Thu Mar 25 23:35:43 2021 From: quozl at laptop.org (James Cameron) Date: Fri, 26 Mar 2021 15:35:43 +1100 Subject: [netrek-dev] SELF_8FLAGS2 aka F_self_8flags2 In-Reply-To: <59EA4B8B-9157-4FE2-A403-E11CED6FF168@mac.com> References: <20210325234626.GA20653@laptop.org> <59EA4B8B-9157-4FE2-A403-E11CED6FF168@mac.com> Message-ID: <20210326043543.GE10763@laptop.org> Thanks. I'm glad. The complexity of short packets is no longer justified; the internet has grown up. On Thu, Mar 25, 2021 at 05:37:23PM -0700, Darrell Root wrote: > The Swift Netrek server does not implement short packets. So no impact to my server. Thanks for asking! > > Darrell > > > > On Mar 25, 2021, at 4:46 PM, James Cameron wrote: > > > > I was cleaning up compiler warnings in a client and found the > > SELF_8FLAGS2 short packets feature that packs some of the me->p_flags > > into a byte does actually misalign the flags beyond the 32-bit width > > of the target variable. > > > > There's no implementation of the feature in my server code. > > > > Does anyone know of a server side implementation of SELF_8FLAGS2? > > > > I'm inclined to remove it rather than fix it without testing it. > > > > -- > > James Cameron > > https://quozl.linux.org.au/ > > _______________________________________________ > > netrek-dev mailing list > > netrek-dev at us.netrek.org > > http://mailman.us.netrek.org/mailman/listinfo/netrek-dev > > _______________________________________________ > netrek-dev mailing list > netrek-dev at us.netrek.org > http://mailman.us.netrek.org/mailman/listinfo/netrek-dev -- James Cameron https://quozl.linux.org.au/ From darrellroot at mac.com Thu Mar 25 23:46:13 2021 From: darrellroot at mac.com (Darrell Root) Date: Thu, 25 Mar 2021 21:46:13 -0700 Subject: [netrek-dev] SELF_8FLAGS2 aka F_self_8flags2 In-Reply-To: <20210326043543.GE10763@laptop.org> References: <20210325234626.GA20653@laptop.org> <59EA4B8B-9157-4FE2-A403-E11CED6FF168@mac.com> <20210326043543.GE10763@laptop.org> Message-ID: Thanks! I thought I was being lazy by skipping the short packets implementation. But I was just forward-thinking! ;-). Related to SELF_8FLAGS2, I happen to be digging into Robert Temple’s old JTrek client this evening and noticed that SELF_8FLAGS2 is turned off by default there too. Of course that’s a client not a server. public class FeatureList { … public Feature[] features = { ... new Feature("SELF_8FLAGS2", Feature.SERVER_TYPE, Feature.OFF, Feature.SEND_FEATURE), Darrell > On Mar 25, 2021, at 9:35 PM, James Cameron wrote: > > Thanks. I'm glad. The complexity of short packets is no longer > justified; the internet has grown up. > > On Thu, Mar 25, 2021 at 05:37:23PM -0700, Darrell Root wrote: >> The Swift Netrek server does not implement short packets. So no impact to my server. Thanks for asking! >> >> Darrell >> >> >>> On Mar 25, 2021, at 4:46 PM, James Cameron wrote: >>> >>> I was cleaning up compiler warnings in a client and found the >>> SELF_8FLAGS2 short packets feature that packs some of the me->p_flags >>> into a byte does actually misalign the flags beyond the 32-bit width >>> of the target variable. >>> >>> There's no implementation of the feature in my server code. >>> >>> Does anyone know of a server side implementation of SELF_8FLAGS2? >>> >>> I'm inclined to remove it rather than fix it without testing it. >>> >>> -- >>> James Cameron >>> https://quozl.linux.org.au/ >>> _______________________________________________ >>> netrek-dev mailing list >>> netrek-dev at us.netrek.org >>> http://mailman.us.netrek.org/mailman/listinfo/netrek-dev >> >> _______________________________________________ >> netrek-dev mailing list >> netrek-dev at us.netrek.org >> http://mailman.us.netrek.org/mailman/listinfo/netrek-dev > > -- > James Cameron > https://quozl.linux.org.au/ > _______________________________________________ > netrek-dev mailing list > netrek-dev at us.netrek.org > http://mailman.us.netrek.org/mailman/listinfo/netrek-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: From quozl at laptop.org Fri Mar 26 00:48:12 2021 From: quozl at laptop.org (James Cameron) Date: Fri, 26 Mar 2021 16:48:12 +1100 Subject: [netrek-dev] SELF_8FLAGS2 aka F_self_8flags2 In-Reply-To: References: <20210325234626.GA20653@laptop.org> <59EA4B8B-9157-4FE2-A403-E11CED6FF168@mac.com> <20210326043543.GE10763@laptop.org> Message-ID: <20210326054812.GF10763@laptop.org> Nice. For your interest, here's where the client code for SELF_8FLAGS2 gets it wrong; https://github.com/quozl/netrek-client-cow/blob/master/short.c#L496 Each of the bit shifts are reversed. I think it should be packet->pad1 & (PFTRACT >> 15)) << 15 Guess code was copied from a server implementation and only partly rewritten. Tedd Hadley and Heiko Wengler's amazing short packets code from 24th May 1993. ;-) On Thu, Mar 25, 2021 at 09:46:13PM -0700, Darrell Root wrote: > Thanks! I thought I was being lazy by skipping the short packets > implementation. But I was just forward-thinking! ;-). > > Related to SELF_8FLAGS2, I happen to be digging into Robert Temple’s old JTrek > client this evening and noticed that SELF_8FLAGS2 is turned off by default > there too. Of course that’s a client not a server. > > public class FeatureList { > … > public Feature[] features = { > ... > new Feature("SELF_8FLAGS2", Feature.SERVER_TYPE, Feature.OFF, > Feature.SEND_FEATURE), > > Darrell > > On Mar 25, 2021, at 9:35 PM, James Cameron <[1]quozl at laptop.org> wrote: > > Thanks. I'm glad. The complexity of short packets is no longer > justified; the internet has grown up. > > On Thu, Mar 25, 2021 at 05:37:23PM -0700, Darrell Root wrote: > > The Swift Netrek server does not implement short packets. So no impact > to my server. Thanks for asking! > > Darrell > > On Mar 25, 2021, at 4:46 PM, James Cameron <[2]quozl at laptop.org> > wrote: > > I was cleaning up compiler warnings in a client and found the > SELF_8FLAGS2 short packets feature that packs some of the me-> > p_flags > into a byte does actually misalign the flags beyond the 32-bit > width > of the target variable. > > There's no implementation of the feature in my server code. > > Does anyone know of a server side implementation of SELF_8FLAGS2? > > I'm inclined to remove it rather than fix it without testing it. > > -- > James Cameron > [3]https://quozl.linux.org.au/ > _______________________________________________ > netrek-dev mailing list > netrek-dev at us.netrek.org > http://mailman.us.netrek.org/mailman/listinfo/netrek-dev > > _______________________________________________ > netrek-dev mailing list > [4]netrek-dev at us.netrek.org > http://mailman.us.netrek.org/mailman/listinfo/netrek-dev > > -- > James Cameron > [5]https://quozl.linux.org.au/ > _______________________________________________ > netrek-dev mailing list > netrek-dev at us.netrek.org > http://mailman.us.netrek.org/mailman/listinfo/netrek-dev > > References: > > [1] mailto:quozl at laptop.org > [2] mailto:quozl at laptop.org > [3] https://quozl.linux.org.au/ > [4] mailto:netrek-dev at us.netrek.org > [5] https://quozl.linux.org.au/ > _______________________________________________ > netrek-dev mailing list > netrek-dev at us.netrek.org > http://mailman.us.netrek.org/mailman/listinfo/netrek-dev -- James Cameron https://quozl.linux.org.au/ From netrek at gmail.com Fri Mar 26 13:17:45 2021 From: netrek at gmail.com (Jesus Saves) Date: Fri, 26 Mar 2021 14:17:45 -0400 Subject: [netrek-dev] SELF_8FLAGS2 aka F_self_8flags2 In-Reply-To: <20210326054812.GF10763@laptop.org> References: <20210325234626.GA20653@laptop.org> <59EA4B8B-9157-4FE2-A403-E11CED6FF168@mac.com> <20210326043543.GE10763@laptop.org> <20210326054812.GF10763@laptop.org> Message-ID: On Fri, Mar 26, 2021 at 1:48 AM James Cameron wrote: > > Tedd Hadley and Heiko Wengler's amazing short packets code from 24th May 1993. ;-) > Wow, most gamers weren't even alive when that code was written! Zach -------------- next part -------------- An HTML attachment was scrubbed... URL: From habig at neutrino.d.umn.edu Fri Mar 26 13:53:52 2021 From: habig at neutrino.d.umn.edu (Alec Habig) Date: Fri, 26 Mar 2021 13:53:52 -0500 Subject: [netrek-dev] SELF_8FLAGS2 aka F_self_8flags2 In-Reply-To: <20210326054812.GF10763@laptop.org> References: <20210325234626.GA20653@laptop.org> <59EA4B8B-9157-4FE2-A403-E11CED6FF168@mac.com> <20210326043543.GE10763@laptop.org> <20210326054812.GF10763@laptop.org> Message-ID: <20210326185352.GA6618@neutrino.d.umn.edu> James Cameron writes: > > Tedd Hadley and Heiko Wengler's amazing short packets code from 24th > May 1993. ;-) Original motivation: Heiko was trying to play from the end of a network connected by string, tin cans, and carrier pigeons from rural Austria. short packets made enough of a difference that we could field a (semi) competitive team from Europe in the INL for most of the seasons the INL was a thing: the Eurotwinks. Our home games were great, because the NA based players had no idea how to play with 300ms ping, but that was the way we played all the time. Even for home games for most of the team :) In related news, the network stack I stole from Heiko (and netrek) to run the SNEWS supernova early warning system has also been showing its age, for the same packet-length confusion reasons as started this thread. We're redoing it all in python and kafka now. -- Alec Habig University of Minnesota Duluth Dept. of Physics and Astronomy ahabig at umn.edu http://neutrino.d.umn.edu/~habig/ From habig at neutrino.d.umn.edu Fri Mar 26 16:01:54 2021 From: habig at neutrino.d.umn.edu (Alec Habig) Date: Fri, 26 Mar 2021 16:01:54 -0500 Subject: [netrek-dev] SELF_8FLAGS2 aka F_self_8flags2 In-Reply-To: <20210326185352.GA6618@neutrino.d.umn.edu> References: <20210325234626.GA20653@laptop.org> <59EA4B8B-9157-4FE2-A403-E11CED6FF168@mac.com> <20210326043543.GE10763@laptop.org> <20210326054812.GF10763@laptop.org> <20210326185352.GA6618@neutrino.d.umn.edu> Message-ID: <20210326210154.GB11715@neutrino.d.umn.edu> Alec Habig writes: > Original motivation: Heiko was trying to play from the end of a > network connected by string, tin cans, and carrier pigeons from rural > Austria. oops - Heiko was at Uni Dortmund (Germany), sorry. A big chunk of our team was at Uni Gratz. -- Alec Habig University of Minnesota Duluth Dept. of Physics and Astronomy ahabig at umn.edu http://neutrino.d.umn.edu/~habig/ From quozl at laptop.org Fri Mar 26 16:04:49 2021 From: quozl at laptop.org (James Cameron) Date: Sat, 27 Mar 2021 08:04:49 +1100 Subject: [netrek-dev] SELF_8FLAGS2 aka F_self_8flags2 In-Reply-To: <20210326185352.GA6618@neutrino.d.umn.edu> References: <20210325234626.GA20653@laptop.org> <59EA4B8B-9157-4FE2-A403-E11CED6FF168@mac.com> <20210326043543.GE10763@laptop.org> <20210326054812.GF10763@laptop.org> <20210326185352.GA6618@neutrino.d.umn.edu> Message-ID: <20210326210449.GC3248@laptop.org> On Fri, Mar 26, 2021 at 01:53:52PM -0500, Alec Habig wrote: > James Cameron writes: > > > > Tedd Hadley and Heiko Wengler's amazing short packets code from 24th > > May 1993. ;-) > > Original motivation: Heiko was trying to play from the end of a > network connected by string, tin cans, and carrier pigeons from > rural Austria. Indeed. In my case, I was playing over 2400 baud modem running SLIP into a VAXstation. Short packets made all the difference. > short packets made enough of a difference that we could field a (semi) > competitive team from Europe in the INL for most of the seasons the INL > was a thing: the Eurotwinks. > > Our home games were great, because the NA based players had no idea how > to play with 300ms ping, but that was the way we played all the time. > Even for home games for most of the team :) Yes, I remember how players with low latency showed a different playing style and were still vulnerable to the attacks from players with high latency. > In related news, the network stack I stole from Heiko (and netrek) to > run the SNEWS supernova early warning system has also been showing its > age, for the same packet-length confusion reasons as started this > thread. We're redoing it all in python and kafka now. I'll contact you offlist about that. -- James Cameron https://quozl.linux.org.au/ From darrellroot at mac.com Fri Mar 26 16:22:51 2021 From: darrellroot at mac.com (Darrell Root) Date: Fri, 26 Mar 2021 14:22:51 -0700 Subject: [netrek-dev] SELF_8FLAGS2 aka F_self_8flags2 In-Reply-To: <20210326210449.GC3248@laptop.org> References: <20210326210449.GC3248@laptop.org> Message-ID: <959B56AE-97AD-48AF-8C12-1EB6DF69033D@mac.com> If we redid Netrek from scratch today, I’m confident we’d use a type-length-value encoding. That way clients and servers can parse past new types of messages without corrupting the data stream. Darrell Sent from my iPad > On Mar 26, 2021, at 2:05 PM, James Cameron wrote: > > On Fri, Mar 26, 2021 at 01:53:52PM -0500, Alec Habig wrote: >> James Cameron writes: >>> >>> Tedd Hadley and Heiko Wengler's amazing short packets code from 24th >>> May 1993. ;-) >> >> Original motivation: Heiko was trying to play from the end of a >> network connected by string, tin cans, and carrier pigeons from >> rural Austria. > > Indeed. In my case, I was playing over 2400 baud modem running SLIP > into a VAXstation. Short packets made all the difference. > >> short packets made enough of a difference that we could field a (semi) >> competitive team from Europe in the INL for most of the seasons the INL >> was a thing: the Eurotwinks. >> >> Our home games were great, because the NA based players had no idea how >> to play with 300ms ping, but that was the way we played all the time. >> Even for home games for most of the team :) > > Yes, I remember how players with low latency showed a different > playing style and were still vulnerable to the attacks from players > with high latency. > >> In related news, the network stack I stole from Heiko (and netrek) to >> run the SNEWS supernova early warning system has also been showing its >> age, for the same packet-length confusion reasons as started this >> thread. We're redoing it all in python and kafka now. > > I'll contact you offlist about that. > > -- > James Cameron > https://quozl.linux.org.au/ > _______________________________________________ > netrek-dev mailing list > netrek-dev at us.netrek.org > http://mailman.us.netrek.org/mailman/listinfo/netrek-dev From quozl at laptop.org Fri Mar 26 16:58:36 2021 From: quozl at laptop.org (James Cameron) Date: Sat, 27 Mar 2021 08:58:36 +1100 Subject: [netrek-dev] SELF_8FLAGS2 aka F_self_8flags2 In-Reply-To: References: <20210325234626.GA20653@laptop.org> <59EA4B8B-9157-4FE2-A403-E11CED6FF168@mac.com> <20210326043543.GE10763@laptop.org> <20210326054812.GF10763@laptop.org> Message-ID: <20210326215836.GF3248@laptop.org> On Fri, Mar 26, 2021 at 02:17:45PM -0400, Jesus Saves wrote: > On Fri, Mar 26, 2021 at 1:48 AM James Cameron <[1]quozl at laptop.org> wrote: > > Tedd Hadley and Heiko Wengler's amazing short packets code from 24th  > > May 1993.  ;-) > > Wow, most gamers weren't even alive when that code was written! Not correct. Gamers are of all ages. Now look at a population pyramid, and estimate the area under the curve born since 1993 compared to those born before 1993. https://ourworldindata.org/age-structure -- James Cameron https://quozl.linux.org.au/ From netrek at gmail.com Fri Mar 26 17:17:17 2021 From: netrek at gmail.com (Jesus Saves) Date: Fri, 26 Mar 2021 18:17:17 -0400 Subject: [netrek-dev] SELF_8FLAGS2 aka F_self_8flags2 In-Reply-To: <20210326215836.GF3248@laptop.org> References: <20210325234626.GA20653@laptop.org> <59EA4B8B-9157-4FE2-A403-E11CED6FF168@mac.com> <20210326043543.GE10763@laptop.org> <20210326054812.GF10763@laptop.org> <20210326215836.GF3248@laptop.org> Message-ID: On Fri, Mar 26, 2021 at 5:58 PM James Cameron wrote: > Not correct. Gamers are of all ages. Now look at a population > pyramid, and estimate the area under the curve born since 1993 > compared to those born before 1993. > > https://ourworldindata.org/age-structure Ah! Interesting. Zach -------------- next part -------------- An HTML attachment was scrubbed... URL: