All of lore.kernel.org
 help / color / mirror / Atom feed
* Why include/net/tcp_states.h is not exported to user-space?
@ 2014-09-30 18:12 Cong Wang
  2014-10-01 17:25 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 3+ messages in thread
From: Cong Wang @ 2014-09-30 18:12 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: David Miller, netdev

Hello,

These states are needed for user-space to specify ->idiag_states.
Currently both libnl and ss make their own copy of these definitions.
Of course, new sock diag is not just limited to TCP, so we probably
need to rename them to SS_* before exporting them.

I can send a patch if you agree.

Thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Why include/net/tcp_states.h is not exported to user-space?
  2014-09-30 18:12 Why include/net/tcp_states.h is not exported to user-space? Cong Wang
@ 2014-10-01 17:25 ` Arnaldo Carvalho de Melo
  2014-10-01 21:26   ` Cong Wang
  0 siblings, 1 reply; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-10-01 17:25 UTC (permalink / raw)
  To: Cong Wang; +Cc: David Miller, netdev

Em Tue, Sep 30, 2014 at 11:12:04AM -0700, Cong Wang escreveu:
> These states are needed for user-space to specify ->idiag_states.
> Currently both libnl and ss make their own copy of these definitions.
> Of course, new sock diag is not just limited to TCP, so we probably
> need to rename them to SS_* before exporting them.
> 
> I can send a patch if you agree.

One would have to check what are the current best practices for doing
that, i.e. probably this would have to go via
include/uapi//linux/tcp_states.h? Or take the time and create a new
header for the inet_diag.h stuff as this is not TCP specific for quite a
while?

If you could investigate how to properly expose this and then come back
with a patch proposal I think that would ease reviewing :-)

- Arnaldo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Why include/net/tcp_states.h is not exported to user-space?
  2014-10-01 17:25 ` Arnaldo Carvalho de Melo
@ 2014-10-01 21:26   ` Cong Wang
  0 siblings, 0 replies; 3+ messages in thread
From: Cong Wang @ 2014-10-01 21:26 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: David Miller, netdev

On Wed, Oct 1, 2014 at 10:25 AM, Arnaldo Carvalho de Melo
<acme@kernel.org> wrote:
> Em Tue, Sep 30, 2014 at 11:12:04AM -0700, Cong Wang escreveu:
>> These states are needed for user-space to specify ->idiag_states.
>> Currently both libnl and ss make their own copy of these definitions.
>> Of course, new sock diag is not just limited to TCP, so we probably
>> need to rename them to SS_* before exporting them.
>>
>> I can send a patch if you agree.
>
> One would have to check what are the current best practices for doing
> that, i.e. probably this would have to go via
> include/uapi//linux/tcp_states.h? Or take the time and create a new
> header for the inet_diag.h stuff as this is not TCP specific for quite a
> while?

Exactly. The problem is, even in kernel, other protocols already use
these TCP_* states. Maybe we should really define SS_* first, and then
let each protocol define their own based on SS_*, including inet_diag?

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-10-01 21:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-30 18:12 Why include/net/tcp_states.h is not exported to user-space? Cong Wang
2014-10-01 17:25 ` Arnaldo Carvalho de Melo
2014-10-01 21:26   ` Cong Wang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.