How to write new plugin


please help me.
I want to write my own plug in.
can any one help me
explain me.
step by step creating my own plugin.

i just want to write plugin using hping command.
so that if cant check the hosts with ping command
i could check it with hping.

thanks in advance.
u can mail me at
[email protected]