On 2016-05-26 19:58, Erik Hugne wrote:
>>  .ti -8
>> +.B tipc bearer add remoteip REMOTEIP media udp name NAME
> 
> Why is the parameter order different from "bearer enable"?
> 
> tipc bearer enable media udp localip xxx name yyy?
> 
> Or can you specify it in this order when adding replicast remoteips aswell?
I assume you mean that the parameter and value comes before the media
and name here.

I spend quite a lot of time thinking about this. The parameters will
work in a different order. However, I'm still not sure what the
supported way should be and I'm open for suggestions / input.

The reasoning is that { media MEDIA { dev DEV | name NAME } is the
bearer identifier. And looking at how other commands like get and set
works they take the bearer identifier last. It's only enable that
doesn't.

$ tipc bearer set priority 123 media udp name foo
$ tipc bearer set priority 123 media eth dev eth0
$ tipc bearer get priority media udp name foo
$ tipc bearer get priority media eth dev eth0

These are global bearer options we set and get. So it makes sense to
have them before identifying the bearer/media. However, when I in
this patch-series introduced some UDP bearer dependent options my
first implementation had them after the bearer identifier.

# UDP specific options comes after the identifier
$ tipc bearer set media udp name foo remoteip 1.2.3.4
$ tipc bearer get media udp name foo remoteip
$ tipc bearer add media udp name foo remoteip 1.2.3.4

# Global options comes before the bearer identifier (today)
$ tipc bearer set priority 123 media udp name foo
$ tipc bearer get priority media udp name foo

Looking at these I just assumed the user would find it hard to use and
confusing that the option is passed in a different place depending on
its type. It's also not clear to me what we actually set/get here.
Everywhere else in the tipc tool we do "set foo bar" where foo is what
we set. Like "node set address 1.2.3". I.e. the key we set/get is always
passed after the set/get word.

So, do you vote for having bearer specific options after the identifier?
$ tipc bearer set priority 123 media udp name foo
$ tipc bearer set media udp name foo remoteip 1.2.3.4
$ tipc bearer add media udp name foo remoteip 1.2.3.4

Or having them in the same place and describing that they are bearer
specific options in the manpage?
$ tipc bearer set priority 123 media eth dev eth0
$ tipc bearer set remoteip 1.2.3.4 media udp name foo
$ tipc bearer add remoteip 1.2.3.4 media udp name foo

Note that the key always comes after the action here ^, which I think
makes it much easier to understand what we actually set.

I'm still not sure what I prefer though.

Regards
Richard

> 
> //E
> 


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
tipc-discussion mailing list
tipc-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tipc-discussion

Reply via email to