Kitz ADSL Broadband Information
adsl spacer  
Support this site
Home Broadband ISPs Tech Routers Wiki Forum
 
     
   Compare ISP   Rate your ISP
   Glossary   Glossary
 
Please login or register.

Login with username, password and session length
Advanced search  

News:

Author Topic: Latest minor fun ‘Workflow’ functions and small apps  (Read 3102 times)

Weaver

  • Addicted Kitizen
  • *****
  • Posts: 6385
  • Retd sw dev; A&A; 4 × 7km ADSL2; IPv6; Firebrick
Latest minor fun ‘Workflow’ functions and small apps
« on: January 27, 2018, 07:07:47 PM »

I keep knocking up more and more functions and small apps in the ios Workflow programming environment app for the ipad. Latest ones are basics such as a very fast number to ascii hex function as I can't find one anywhere in the supplied runtime library. Small things as basic as that. But the lack of the usual low level operators requires cunning from the days of the early 1980s ZX81 BASIC and the crude tricks of that era.

Next routines: a routine that take a CIDR /nbits integer value and comes back with an ipv4 or ipv6 netmask in ascii.

But I also need to do some pref-length masking arithmetic on ipv6 addresses, for example testing if an address is in the range of say some /nbits so given say 2001:db8:beef:cafe:cec1::/40 testing whether some other ip address is inside that range given by the netmask as applied to that prefix with the irrelevant low-order bits knocked out.

Another thing I'm having fun with is a routine to edit a firebrick XML config file and insert an updated set of PPPoE modems’ upstream speed rate limiter value settings into it. I need to tell the Firebrick what speed to drive the three modems at that are plugged into it. I already wrote a routine to calculate a chunk of XML text containing the right numbers derived from line speed values which I can see from the ISP (who I think gets them from the DSLAM via BT's systems ultimately). I get the raw numbers from either doing a status query operation in their control server or by seeing a logfile event in that same server’s per-line event log. From those numbers I apply a downgrade factor according to the protocol inefficiencies of ATM etc data bloat, depending on the protocol stack in use and its associated parameters, and then that times a further downgrade to prevent overloading the modems and keeping their ingress queues down to something safe.

I next need to write something to surgically insert this XML snippet of updated speed rates into an existing XML config file to produce a new modified version. I have a routine already to upload an XML config file into the firebrick from the ipad and trigger the new settings to take effect and I can even reboot the Brick remotely too. But the routine to do the file editing surgery is the last link in the chain of automating a large part of this chore.
Logged

burakkucat

  • Global Moderator
  • Senior Kitizen
  • *
  • Posts: 24231
  • Over the Rainbow Bridge
    • The ELRepo Project
Re: Latest minor fun ‘Workflow’ functions and small apps
« Reply #1 on: January 27, 2018, 07:27:16 PM »

Next routines: a routine that take a CIDR /nbits integer value and comes back with an ipv4 or ipv6 netmask in ascii.

But I also need to do some pref-length masking arithmetic on ipv6 addresses, for example testing if an address is in the range of say some /nbits so given say 2001:db8:beef:cafe:cec1::/40 testing whether some other ip address is inside that range given by the netmask as applied to that prefix with the irrelevant low-order bits knocked out.

Would whatmask be of any use to you?
Logged
:cat:  100% Linux and, previously, Unix. Co-founder of the ELRepo Project.

Please consider making a donation to support the running of this site.

Weaver

  • Addicted Kitizen
  • *****
  • Posts: 6385
  • Retd sw dev; A&A; 4 × 7km ADSL2; IPv6; Firebrick
Re: Latest minor fun ‘Workflow’ functions and small apps
« Reply #2 on: January 28, 2018, 02:26:56 AM »

thank you very much for that link!

The lack of a bitwise AND operation in Workflow means I have to write my own using who knows what nightmarish mountain of code. That is going to be fun. I may end up with using a technique that I've used before and precompute a lookup table of some sort to vastly speed up things.
Logged