polerin: My shadow on a wall (Default)
I think I've got it all working, I just need to get some standard sources so I can actually compile against them... silly things like... oh.. the kernel and glibc... nothing major.

we'll see... now lets hope I understood how the makefile works (probably NOT) and weither it'll overwrite the gnu standard ping (I hope not).

Cross fingers, we'll know sometime later ;)

For all of my general satisfaction with open source stuff... this is the first time I've actually done the whole "Hmm.. this program doesn't do quite what I need... lets change it!" thing. Assuming it works, which I think it will in fairly short order... what I did isn't overly complex, I'll be very satisfied and probably take one more step in the open source evangalist direction.

Great... one more thing for me to rant about :P
polerin: My shadow on a wall (Default)
I had forgotten how DENSE c can get
I'm looking to modify the standard ping so it has a more easily parseable output, and I'm having trouble even figuring out how they are specifying the flags for the options... I think I've got it specified right (commented as //right here), but heck if I can figure out how to associate that with -E on the command line (I think I added it right in the block below, but I can't figure out how the #defines and the optstring relate)


//start code
#define F_FLOOD 0x001
#define F_INTERVAL 0x002
#define F_NUMERIC 0x004
#define F_PINGFILLED 0x008
#define F_QUIET 0x010
#define F_RROUTE 0x020
#define F_SO_DEBUG 0x040
#define F_SO_DONTROUTE 0x080
#define F_VERBOSE 0x100
#define F_TIMESTAMP 0x200
#define F_FLOWINFO 0x200
#define F_SOURCEROUTE 0x400
#define F_TCLASS 0x400
#define F_FLOOD_POLL 0x800
#define F_LATENCY 0x1000
#define F_AUDIBLE 0x2000
#define F_ADAPTIVE 0x4000
#define F_STRICTSOURCE 0x8000
#define F_NOLOOP 0x10000
#define F_TTL 0x20000
#define F_EASYOUT 0x40000 //right here



//and how the heck do I add something to THIS mess?
//(note that 'E' is my attempt
#define COMMON_OPTIONS \
case 'a': case 'U': case 'c': case 'd': \
case 'f': case 'i': case 'w': case 'l': \
case 'S': case 'n': case 'p': case 'q': \
case 'r': case 's': case 'v': case 'L': \
case 't': case 'A': case 'W': case 'B': \
case 'E':



define COMMON_OPTSTR "h?VQ:I:M:aUc:dfi:w:l:S:np:qrs:vLt:AW:B:E"

//end code


This is why I don't code for a living.... wait.. that's what I'm asking to do... d'oh. At least I don't have to add the code for specifying an address to this :)

Profile

polerin: My shadow on a wall (Default)
polerin

November 2009

S M T W T F S
12345 67
891011121314
15161718192021
22232425262728
2930     

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 24th, 2017 05:42 pm
Powered by Dreamwidth Studios