Path: utzoo!utgpu!cs.utexas.edu!wuarchive!sdd.hp.com!think.com!linus!philabs!ttidca!hollombe From: hollombe@ttidca.TTI.COM (The Polymath) Newsgroups: alt.hackers Subject: The rutgers problem (and a hack) Message-ID: <23823@ttidca.TTI.COM> Date: 22 Feb 91 01:29:31 GMT Organization: The Cat Factory Lines: 41 Approved: Because I say so. There's a very simple solution to flames and other inappropriate posts: Ignore it and it will go away. This has been tried and tested in other groups and it works well. Even the stubbornest net.bozo soon tires of shouting at a blank wall. Non- response is the best defense. Ob. hack: A function that analyzes packetized NAPLPS descriptions on-the-fly in real time. The good news: First and last packets are flagged and all are guaranteed to be in proper sequence. The bad news: A packet boundary can fall at any byte in any of the NAPLPS description fields. The fields range from several hundred bytes long to single, bit-mapped bytes and have very little in common with each other. The number of packets expected for a given description is indeterminate. The last packet, which may also be the first, is usually short. The solution involves a massive for loop, more switches and cases than I like to think about and a stable of static variables. The following comment sits just before the for loop: /****************************************************************/ /* Main analysis loop. Initial value of i set in preceding if. */ /* Walks through packet one byte at a time. Yes, it really is */ /* nearly 600 lines long. Sorry about that. If you haven't */ /* read the documentation listed in the function header, */ /* DON'T MESS WITH IT! */ /****************************************************************/ -- The Polymath (aka: Jerry Hollombe, M.A., CDP, aka: hollombe@ttidca.tti.com) Head Robot Wrangler at Citicorp Illegitimis non 3100 Ocean Park Blvd. (213) 450-9111, x2483 Carborundum Santa Monica, CA 90405 {rutgers|pyramid|philabs|psivax}!ttidca!hollombe Brought to you by Super Global Mega Corp .com