Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am jlyo on github.
  • I am jlyo (https://keybase.io/jlyo) on keybase.
  • I have a public key whose fingerprint is 315C FF34 A3BC 0E16 3CEC 898D 8B34 C3AC D9EC 4622

To claim this, I am signing this object:

@jlyo
jlyo / isip.rl
Created September 21, 2012 21:28
Ragel IPv4/6 address validator
#include <stdbool.h>
#include <string.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <netdb.h>
%%{
machine isip;
octet4 = [0-9]{1,2}