11
Apr 09

Metakall User Trial

So this is what I’ve been up to for the last year; building this pretty much from scratch (rebuilding it in fact) and getting it to the launched stage. Everything from low-level C code for custom servers, to custom freeRADIUS modules (again in C) to the MacOS and iPhone/iPod Touch clients I’m writing at the moment (Will, if you’re reading this, I’m finally using Objective C again 😀 ), and all the project management and dogsbody stuff you’d expect.

Fingers crossed it works properly 🙂

METAKALL USER TRIAL KICKS OFF IN TRINITY COLLEGE DUBLIN

For Immediate Release

METAKALL USER TRIAL KICKS OFF IN TRINITY COLLEGE DUBLIN

Dublin, April 10 — Metakall, a WiFi authentication and metering system, has begun its second user trial in Trinity College Dublin this week for students and staff, allowing access to the internet from mobile devices and allowing them to make phone calls over the internet in cooperation with FreeSpeech.ie.

Metakall, which is funded by an Enterprise Ireland grant, may be among the first of 300 companies to spin out under the new joint TCD/UCD Innovation Academy announced last month by the two colleges along with the Taoiseach, Tanaiste, Minster for Finance and Minister for Education.

Headed up by Dr.Hitesh Tewari, an expert in internet micropayments, the project has a working system but is still working on usability, testing, and on creating new clients for different platforms. Several companies including Eircom and O2 have expressed interest in the technology developed by Metakall, and talks are ongoing regarding a possible installation in San Jose.

The Metakall system was initially trialled in August last year in TCD. Significant changes have since been made to the technology, which consists of a client which runs on the user’s laptop or mobile phone, connecting them to the wireless internet system on the TCD campus as well as in satellite sites in Trinity Halls, St.James’ Hospital and Santry.

This client, which runs under Microsoft Windows XP, Vista and the new Windows 7 operating system, as well as on several mobile phones, utilises Metakall’s Zero Touch Authentication technology to allow users to use the internet on their netbook or phone. Clients for MacBooks and both the iPhone and the iPod Touch are in active development. Clients for Google Android and the Palm Pre are planned.

Those students and staff who are interested can find out more and sign up for the trial, which has places for up to a thousand users, on the Metakall website at http://metakall.dsg.cs.tcd.ie.

Ultimately, the team hope to spin out and form their own company to market the technology commercially at home and abroad. Metakall received 400,000 euro in funding from Enterprise Ireland for the initial development of their technology.

PHOTOS AND GRAPHICS:
http://metakall.dsg.cs.tcd.ie/Press/Metakall.jpg
http://metakall.dsg.cs.tcd.ie/Press/MetakallUSBKey.jpg
http://metakall.dsg.cs.tcd.ie/Press/MetakallLogo.png

CONTACT DETAILS:

Hitesh Tewari, Principal Investigator
htewari@cs.tcd.ie
087 212 2008
Distributed Systems Group
School of Computer Science and Statistics
Trinity College Dublin
Dublin 2

Mark Dennehy, Project Manager
mark.dennehy@cs.tcd.ie
085 774 7546
Distributed Systems Group
School of Computer Science and Statistics
Trinity College Dublin
Dublin 2

29
Jan 09

gethostbyname_r()

Okay, so I can’t really go into too much of the big picture since this is from the day job, but I can certainly tear into gethostbyname_r() a bit.

For part of what we’re doing, we’re sending a RADIUS message using the freeradius project’s radius client library. So, nice and simple (after you’ve done some setup):
[cc escaped=”true” lang=”c”]result = rc_acct(rh, 0, send);[/cc]
Easy enough, right? So it fails. Specifically, it segfaults and since it’s in a multithreaded server, it’s a pain to track down. And I mean a pain. Hours of fun with DDD, gdb, nana and finally printf() lead to here:
[cc escaped=”true” lang=”c”]res = gethostbyname_r(hostname, &hostbuf, tmphostbuf, hostbuflen, &hp, &herr)[/cc]
Ah. gethostbyname_r(), the glibc2-reentrant thread-safe version of gethostbyname(). Except that it’s deprecated, and has the unique property of working differently on just about every machine out there.

And of course, in my machine, and the server, it’s going nuts. Not because of a dodgy parameter or anything like that, though that took a while to confirm, it’s going nuts because of the way /etc/nsswitch.conf is written:

hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4

That’s the standard way to write nsswitch.conf in ubuntu – it first checks the  /etc/hosts file, then uses the avahi daemon, then the DNS system.

Only that’s not good enough for gethostbyname_r(). Grrr. So after a full day bug-chasing through two codebases, the fix is to change a configuration file to this:

#hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4
hosts:          dns files

What a waste of a day! Gah!

I’m going to rewrite the radius-client library to use getaddrinfo() over the next while. I already have to make some changes to it to cope with other things, I may as well help here too I guess. But for today, I console myself by printing out that page of source code and reaching for the matches…