* usbmon structures headers?
@ 2020-07-04 21:43 Diego Elio Pettenò
2020-07-04 21:46 ` Diego Elio Pettenò
0 siblings, 1 reply; 4+ messages in thread
From: Diego Elio Pettenò @ 2020-07-04 21:43 UTC (permalink / raw)
To: Pete Zaitcev, Paolo Abeni, Kris Katterjohn; +Cc: linux-usb
Hi folks,
I'm trying to write a quick implementation of usbmon capture in Cython, for an Apache-2.0 licensed project[1].
As I followed the documentation[2], I realised that the definition of ioctl constants and structures for usbmon are not exposed in headers at all, only in the sources[3]. This makes it… a bit of a problem, because I'm not sure if mimicking the structures in Cython falls into the syscall exception at that point.
Interesting enough, libpcap appears to define the same values, but apply an MIT license to them[4], so I could copy them from there, but I thought I would at least check first, if this should be exposed in the first place.
Please advise!
[1]: https://github.com/Flameeyes/usbmon-tools
[2]: https://www.kernel.org/doc/Documentation/usb/usbmon.txt
[3]: https://github.com/torvalds/linux/blob/master/drivers/usb/mon/mon_bin.c
[4]: https://github.com/the-tcpdump-group/libpcap/blob/master/pcap-usb-linux.c
--
Flameeyes
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: usbmon structures headers?
2020-07-04 21:43 usbmon structures headers? Diego Elio Pettenò
@ 2020-07-04 21:46 ` Diego Elio Pettenò
2020-07-05 14:24 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Diego Elio Pettenò @ 2020-07-04 21:46 UTC (permalink / raw)
To: Pete Zaitcev, Paolo Abeni, Kris Katterjohn; +Cc: linux-usb
(Updating Paolo's email, that is out of date in both sources.)
On Sat, Jul 4, 2020, at 22:43, Diego Elio Pettenò wrote:
> Hi folks,
>
> I'm trying to write a quick implementation of usbmon capture in Cython,
> for an Apache-2.0 licensed project[1].
>
> As I followed the documentation[2], I realised that the definition of
> ioctl constants and structures for usbmon are not exposed in headers at
> all, only in the sources[3]. This makes it… a bit of a problem, because
> I'm not sure if mimicking the structures in Cython falls into the
> syscall exception at that point.
>
> Interesting enough, libpcap appears to define the same values, but
> apply an MIT license to them[4], so I could copy them from there, but I
> thought I would at least check first, if this should be exposed in the
> first place.
>
> Please advise!
>
> [1]: https://github.com/Flameeyes/usbmon-tools
> [2]: https://www.kernel.org/doc/Documentation/usb/usbmon.txt
> [3]: https://github.com/torvalds/linux/blob/master/drivers/usb/mon/mon_bin.c
> [4]: https://github.com/the-tcpdump-group/libpcap/blob/master/pcap-usb-linux.c
>
> --
> Flameeyes
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: usbmon structures headers?
2020-07-04 21:46 ` Diego Elio Pettenò
@ 2020-07-05 14:24 ` Greg KH
2020-07-05 14:28 ` Diego Elio Pettenò
0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2020-07-05 14:24 UTC (permalink / raw)
To: Diego Elio Pettenò
Cc: Pete Zaitcev, Paolo Abeni, Kris Katterjohn, linux-usb
On Sat, Jul 04, 2020 at 10:46:09PM +0100, Diego Elio Pettenò wrote:
> (Updating Paolo's email, that is out of date in both sources.)
>
> On Sat, Jul 4, 2020, at 22:43, Diego Elio Pettenò wrote:
> > Hi folks,
> >
> > I'm trying to write a quick implementation of usbmon capture in Cython,
> > for an Apache-2.0 licensed project[1].
> >
> > As I followed the documentation[2], I realised that the definition of
> > ioctl constants and structures for usbmon are not exposed in headers at
> > all, only in the sources[3]. This makes it… a bit of a problem, because
> > I'm not sure if mimicking the structures in Cython falls into the
> > syscall exception at that point.
> >
> > Interesting enough, libpcap appears to define the same values, but
> > apply an MIT license to them[4], so I could copy them from there, but I
> > thought I would at least check first, if this should be exposed in the
> > first place.
> >
> > Please advise!
> >
> > [1]: https://github.com/Flameeyes/usbmon-tools
> > [2]: https://www.kernel.org/doc/Documentation/usb/usbmon.txt
> > [3]: https://github.com/torvalds/linux/blob/master/drivers/usb/mon/mon_bin.c
> > [4]: https://github.com/the-tcpdump-group/libpcap/blob/master/pcap-usb-linux.c
Yeah, we really should put those structures in include/uapi/ with the
proper license. Care to make a patch for it?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: usbmon structures headers?
2020-07-05 14:24 ` Greg KH
@ 2020-07-05 14:28 ` Diego Elio Pettenò
0 siblings, 0 replies; 4+ messages in thread
From: Diego Elio Pettenò @ 2020-07-05 14:28 UTC (permalink / raw)
To: Greg KH; +Cc: Pete Zaitcev, Paolo Abeni, Kris Katterjohn, linux-usb
Yep sounds good (at least I'll try to do it right.)
On Sun, Jul 5, 2020, at 15:24, Greg KH wrote:
> On Sat, Jul 04, 2020 at 10:46:09PM +0100, Diego Elio Pettenò wrote:
> > (Updating Paolo's email, that is out of date in both sources.)
> >
> > On Sat, Jul 4, 2020, at 22:43, Diego Elio Pettenò wrote:
> > > Hi folks,
> > >
> > > I'm trying to write a quick implementation of usbmon capture in Cython,
> > > for an Apache-2.0 licensed project[1].
> > >
> > > As I followed the documentation[2], I realised that the definition of
> > > ioctl constants and structures for usbmon are not exposed in headers at
> > > all, only in the sources[3]. This makes it… a bit of a problem, because
> > > I'm not sure if mimicking the structures in Cython falls into the
> > > syscall exception at that point.
> > >
> > > Interesting enough, libpcap appears to define the same values, but
> > > apply an MIT license to them[4], so I could copy them from there, but I
> > > thought I would at least check first, if this should be exposed in the
> > > first place.
> > >
> > > Please advise!
> > >
> > > [1]: https://github.com/Flameeyes/usbmon-tools
> > > [2]: https://www.kernel.org/doc/Documentation/usb/usbmon.txt
> > > [3]: https://github.com/torvalds/linux/blob/master/drivers/usb/mon/mon_bin.c
> > > [4]: https://github.com/the-tcpdump-group/libpcap/blob/master/pcap-usb-linux.c
>
> Yeah, we really should put those structures in include/uapi/ with the
> proper license. Care to make a patch for it?
>
> thanks,
>
> greg k-h
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-07-05 14:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-04 21:43 usbmon structures headers? Diego Elio Pettenò
2020-07-04 21:46 ` Diego Elio Pettenò
2020-07-05 14:24 ` Greg KH
2020-07-05 14:28 ` Diego Elio Pettenò
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox