How do I detect if there is a direct cable connection present?

Also, how do I 'dial?' a dcc connection automatically - without the box which you have to type in hostcomp etc. Is it parameters I have to add???