Inform about bound port for os-chosen ones

Here -1 is for error code I believe. Would not it be nice, if we have a success/fail kind of definition for that ?