I need to modify mount app, so that I can specify the source port to be one specific one not the randomly generated by the OS.

For example lets say we are trying to mount a filesystem in a computer with ip 10.0.0.55 and our computer where we going to be executing the mount is 10.0.0.40

so when you do the command the destination port (ie the port 10.0.0.55 is listening ) is fine but when you do the command the source port is randomly generated by the os and that is the port 10.0.0.55 uses to reply back to the other pc that pc is behind a router so there have to be an specific port

Any ideas I have tried modifying where the function bindresvport() is called and binding that socket to an specific port but it doesnt seem to work


Question: Apps are not permitted to access the UDID
Answer: According to Apple guidelines you should use advertisingIdentifier.
Problem that in iOS 5 it's not working.
Feel free to use this code:

- (NSString *) advertisingIdentifier
{
    if (!NSClassFromString(@"ASIdentifierManager")) {
        SEL selector = NSSelectorFromString(@"uniqueIdentifier");
        if ([[UIDevice currentDevice] respondsToSelector:selector]) {
            return [[UIDevice currentDevice] performSelector:selector];
        }
        //or get macaddress here http://iosdevelopertips.com/device/determine-mac-address.html
    }
    return [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString];
}