Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| net_ioctl [2018/09/03 16:10] – [send_ioctl()] rpjday | net_ioctl [2018/09/04 10:31] (current) – [send_ioctl()] rpjday | ||
|---|---|---|---|
| Line 19: | Line 19: | ||
| ===== Sample userspace call: ethtool ===== | ===== Sample userspace call: ethtool ===== | ||
| + | |||
| + | Git repo is [[https:// | ||
| ==== send_ioctl() ==== | ==== send_ioctl() ==== | ||
| Line 28: | Line 30: | ||
| int send_ioctl(struct cmd_context *ctx, void *cmd) | int send_ioctl(struct cmd_context *ctx, void *cmd) | ||
| { | { | ||
| - | ctx-> | + | ctx-> |
| return ioctl(ctx-> | return ioctl(ctx-> | ||
| } | } | ||
| #endif | #endif | ||
| </ | </ | ||
| + | |||
| + | QUESTION: What is returned in ifreq%%-> | ||
| ==== struct cmd_context ==== | ==== struct cmd_context ==== | ||
| - | From '' | + | From '' |
| < | < | ||
| Line 52: | Line 56: | ||
| ==== struct ifreq ==== | ==== struct ifreq ==== | ||
| - | From '' | + | From '' |
| < | < | ||
| Line 130: | Line 134: | ||
| ==== sock_ioctl() ==== | ==== sock_ioctl() ==== | ||
| - | Also from '' | + | Also from '' |
| < | < | ||
| Line 154: | Line 158: | ||
| return -EFAULT; | return -EFAULT; | ||
| } else | } else | ||
| + | </ | ||
| + | |||
| + | This reflects wireless extensions, which should not be relevant: | ||
| + | |||
| + | < | ||
| #ifdef CONFIG_WEXT_CORE | #ifdef CONFIG_WEXT_CORE | ||
| if (cmd >= SIOCIWFIRST && cmd <= SIOCIWLAST) { | if (cmd >= SIOCIWFIRST && cmd <= SIOCIWLAST) { | ||
| Line 159: | Line 168: | ||
| } else | } else | ||
| #endif | #endif | ||
| + | </ | ||
| + | |||
| + | Finally, this is where we should end up: | ||
| + | |||
| + | < | ||
| switch (cmd) { | switch (cmd) { | ||
| case FIOSETOWN: | case FIOSETOWN: | ||