Can client port be set for FileTransferApplication?

37 views
Skip to first unread message

zhao yang

unread,
Sep 23, 2016, 9:32:04 AM9/23/16
to ns-3-users
 I don't find its getTypeId() like function and it seems only remote can be set.

Tommaso Pecorella

unread,
Sep 23, 2016, 10:19:54 AM9/23/16
to ns-3-users
I don't find the application at all !

T.

zhao yang

unread,
Sep 23, 2016, 10:13:06 PM9/23/16
to ns-3-users
Sorry, I mean by FileTransferHelper and PacketSinkHelper. In fact, the only information about attribute is got from its constructor.

在 2016年9月23日星期五 UTC+8下午10:19:54,Tommaso Pecorella写道:

Tommaso Pecorella

unread,
Sep 24, 2016, 5:34:52 AM9/24/16
to ns-3-users
Same as above. There's no "FileTransferHelper" in ns-3.
We can't provide help, support or hints on stuff we don't know - it's clearly stated in the posting guidelines.

T.

zhao yang

unread,
Sep 24, 2016, 7:05:32 AM9/24/16
to ns-3-users
Hello, I am using ns-3-lbt. And it is in the Application module. 

在 2016年9月24日星期六 UTC+8下午5:34:52,Tommaso Pecorella写道:

Tommaso Pecorella

unread,
Sep 25, 2016, 5:50:28 AM9/25/16
to ns-3-users
Ok, now we start to talk. It was as simple as saying where the source file was (or attaching it).

The "Remote" attribute is an InetSocketAddress (or Inet6SocketAddress). I.e., a pair of destination IP and destination port (and more things, but that's not the point).
Changing the "Remote" attribute you can change both of them.

About the source IP and port, the IP is chosen among the source node IP addresses, and (if there's no bug) should be the "nearest" (in terms of routing) to the destination.
The source port is an ephemeral port, i.e., you don't know what port it is until you use it.
This is wanted, because otherwise two applications of the same kind couldn't coexist in the same node. Also real FTP clients do the same.
Of course you could override this, but you'll have the above limitation.

Cheers,

T.

zhao yang

unread,
Sep 26, 2016, 2:46:57 AM9/26/16
to ns-3-users
Thanks a lot.

在 2016年9月25日星期日 UTC+8下午5:50:28,Tommaso Pecorella写道:
Reply all
Reply to author
Forward
Message has been deleted
0 new messages