Re: [PATCH v2 iproute2 3/3] ss: Add support to filter on device

2016-06-28 Thread Stephen Hemminger
On Tue, 28 Jun 2016 11:40:40 -0600 David Ahern wrote: > On 6/27/16 3:13 PM, Stephen Hemminger wrote: > > On Mon, 27 Jun 2016 11:34:25 -0700 > > David Ahern wrote: > > > >> + case SSF_DEVCOND: > >> + { > >> + struct aafilter *a = (void *)f->pred; > > > > I don't like the wa

Re: [PATCH v2 iproute2 3/3] ss: Add support to filter on device

2016-06-28 Thread David Ahern
On 6/27/16 3:13 PM, Stephen Hemminger wrote: On Mon, 27 Jun 2016 11:34:25 -0700 David Ahern wrote: + case SSF_DEVCOND: + { + struct aafilter *a = (void *)f->pred; I don't like the wandering bracket left, but all the code has that. After this will change it t

Re: [PATCH v2 iproute2 3/3] ss: Add support to filter on device

2016-06-27 Thread Stephen Hemminger
On Mon, 27 Jun 2016 11:34:25 -0700 David Ahern wrote: > + case SSF_DEVCOND: > + { > + struct aafilter *a = (void *)f->pred; I don't like the wandering bracket left, but all the code has that. After this will change it to: case SSF_DEVCOND: {

[PATCH v2 iproute2 3/3] ss: Add support to filter on device

2016-06-27 Thread David Ahern
Add support for device names in the filter. Example: root@kenny:~# ss -t 'sport == :22 && dev == red' State Recv-Q Send-Q Local Address:Port Peer Address:Port ESTAB 0 0 10.100.1.2%red:ssh 10.100.1.254:47814 ESTAB 0 0 2100:1