Oliver Hartkopp wrote: > Wolfgang Grandegger wrote: >> Luotao Fu wrote: >>> Hi Wolfgang, >>> >>> On Tue, Nov 24, 2009 at 03:46:22PM +0100, Wolfgang Grandegger wrote: >>>> Hi Fu, >>>> >>>> Luotao Fu wrote: >>>>> Hi folks, >>>>> >>>>> I was trying to integrate socketcan control in an application the last >>>>> days and >>>>> spent quite a lot of time getting clear how to deal with the netlink >>>>> interface. > > > Nice idea! Especially for some kind of *integrated* (GUI-based) applications. > > >>>>> int scan_set_bitrate(const char *name, __u32 bitrate); >>>>> int scan_set_restart_ms(const char *name, __u32 restart_ms); >>>>> int scan_set_ctrlmode(const char *name, __u32 mode, __u32 flags); >>>>> >>>>> int scan_get_state(const char *name, int *state); >>>>> int scan_get_restart_ms(const char *name, __u32 *restart_ms); >>>>> int scan_get_bittiming(const char *name, struct can_bittiming *bt); >>>>> int scan_get_ctrlmode(const char *name, struct can_ctrlmode *cm); > > > I'm not really happy with the 'scan_' prefix ... > > I assume it's derived from s(ocket)can, and not from scan(ner) right? ;-) > > What about 'canhw_' ??
Or just "can" ??? That's the name we use for prefixes, dirs, doc, etc. as well. > Like this: > >>>>> int canhw_set_bitrate(const char *name, __u32 bitrate); >>>>> int canhw_set_restart_ms(const char *name, __u32 restart_ms); >>>>> int canhw_set_ctrlmode(const char *name, __u32 mode, __u32 flags); >>>>> >>>>> int canhw_get_state(const char *name, int *state); >>>>> int canhw_get_restart_ms(const char *name, __u32 *restart_ms); >>>>> int canhw_get_bittiming(const char *name, struct can_bittiming *bt); >>>>> int canhw_get_ctrlmode(const char *name, struct can_ctrlmode *cm); > > This leads also to 'libcanhw' as library name. > > "SocketCAN" and "Netlink" is just state-of-the-art for CAN hardware in Linux. > No need to put it into the library name ... > > IMHO there's also no real benefit to put this lib together with the helpers in > > trunk/can-utils/lib.[ch] > > These are addressing different topics. Well, canconfig is a can-util, which is based on the lib. I personally would prefer a common place for can-utils, libraries and example code. But anyhow, I appreciate any effort to consolidate and unify the can-utils and related libs and examples. When time permits, I will migrate "trunk/kernel/2.6" to GIT. >> Well, yes, I should add some more lines to Documentation/can.txt. >> Also, keep it simple having in mind that it's especially useful on >> embedded system (the busybox's "ip" utility does not yet support CAN). > > > Which should be fixed inside busybox :-) Patches are always welcome ;-). I already had a look. Unfortunately, the busybox version does not even support the ip link stuff. > Fortunately ptxdist allows the iproute2 package to be build instead of using > the built-in 'ip' from busybox. But it's big compared to the busybox version. Well, these days nobody cares about memory footprint any more :-(. Wolfgang. _______________________________________________ Socketcan-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/socketcan-users
