ioctl_macros 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. # socket ioctls allowed to unprivileged apps
  2. define(`unpriv_sock_ioctls', `
  3. {
  4. # Socket ioctls for gathering information about the interface
  5. SIOCGSTAMP SIOCGSTAMPNS
  6. SIOCGIFNAME SIOCGIFCONF SIOCGIFFLAGS SIOCGIFADDR SIOCGIFDSTADDR SIOCGIFBRDADDR
  7. SIOCGIFNETMASK SIOCGIFMTU SIOCGIFINDEX SIOCGIFCOUNT SIOCGIFTXQLEN
  8. # Wireless extension ioctls. Primarily get functions.
  9. SIOCGIWNAME SIOCGIWFREQ SIOCGIWMODE SIOCGIWSENS SIOCGIWRANGE SIOCGIWPRIV
  10. SIOCGIWSTATS SIOCGIWSPY SIOCSIWTHRSPY SIOCGIWTHRSPY SIOCGIWRATE SIOCGIWRTS
  11. SIOCGIWFRAG SIOCGIWTXPOW SIOCGIWRETRY SIOCGIWPOWER
  12. }')
  13. # socket ioctls never allowed to unprivileged apps
  14. define(`priv_sock_ioctls', `
  15. {
  16. # qualcomm rmnet ioctls
  17. WAN_IOC_ADD_FLT_RULE WAN_IOC_ADD_FLT_INDEX
  18. # socket ioctls
  19. SIOCADDRT SIOCDELRT SIOCRTMSG SIOCSIFLINK SIOCSIFFLAGS SIOCSIFADDR
  20. SIOCSIFDSTADDR SIOCSIFBRDADDR SIOCSIFNETMASK SIOCGIFMETRIC SIOCSIFMETRIC SIOCGIFMEM
  21. SIOCSIFMEM SIOCSIFMTU SIOCSIFNAME SIOCSIFHWADDR SIOCGIFENCAP SIOCSIFENCAP
  22. SIOCGIFHWADDR SIOCGIFSLAVE SIOCSIFSLAVE SIOCADDMULTI SIOCDELMULTI
  23. SIOCSIFPFLAGS SIOCGIFPFLAGS SIOCDIFADDR SIOCSIFHWBROADCAST SIOCKILLADDR SIOCGIFBR SIOCSIFBR
  24. SIOCSIFTXQLEN SIOCETHTOOL SIOCGMIIPHY SIOCGMIIREG SIOCSMIIREG SIOCWANDEV
  25. SIOCOUTQNSD SIOCDARP SIOCGARP SIOCSARP SIOCDRARP SIOCGRARP SIOCSRARP SIOCGIFMAP
  26. SIOCSIFMAP SIOCADDDLCI SIOCDELDLCI SIOCGIFVLAN SIOCSIFVLAN SIOCBONDENSLAVE
  27. SIOCBONDRELEASE SIOCBONDSETHWADDR SIOCBONDSLAVEINFOQUERY SIOCBONDINFOQUERY
  28. SIOCBONDCHANGEACTIVE SIOCBRADDBR SIOCBRDELBR SIOCBRADDIF SIOCBRDELIF SIOCSHWTSTAMP
  29. # device and protocol specific ioctls
  30. SIOCDEVPRIVATE-SIOCDEVPRIVLAST
  31. SIOCPROTOPRIVATE-SIOCPROTOPRIVLAST
  32. # Wireless extension ioctls
  33. SIOCSIWCOMMIT SIOCSIWNWID SIOCSIWFREQ SIOCSIWMODE SIOCSIWSENS SIOCSIWRANGE
  34. SIOCSIWPRIV SIOCSIWSTATS SIOCSIWSPY SIOCSIWAP SIOCGIWAP SIOCSIWMLME SIOCGIWAPLIST
  35. SIOCSIWSCAN SIOCGIWSCAN SIOCSIWESSID SIOCGIWESSID SIOCSIWNICKN SIOCGIWNICKN
  36. SIOCSIWRATE SIOCSIWRTS SIOCSIWFRAG SIOCSIWTXPOW SIOCSIWRETRY SIOCSIWENCODE
  37. SIOCGIWENCODE SIOCSIWPOWER SIOCSIWGENIE SIOCGIWGENIE SIOCSIWAUTH SIOCGIWAUTH
  38. SIOCSIWENCODEEXT SIOCGIWENCODEEXT SIOCSIWPMKSA
  39. # Dev private ioctl i.e. hardware specific ioctls
  40. SIOCIWFIRSTPRIV-SIOCIWLASTPRIV
  41. }')
  42. # commonly used ioctls on unix sockets
  43. define(`unpriv_unix_sock_ioctls', `{
  44. TIOCOUTQ FIOCLEX FIONCLEX TCGETS TIOCGWINSZ TIOCSWINSZ FIONREAD
  45. }')
  46. # commonly used TTY ioctls
  47. # merge with unpriv_unix_sock_ioctls?
  48. define(`unpriv_tty_ioctls', `{
  49. TIOCOUTQ FIOCLEX FIONCLEX TCGETS TCSETS TIOCGWINSZ TIOCSWINSZ TIOCSCTTY
  50. TCSETSW TCFLSH TIOCSPGRP TIOCGPGRP
  51. }')
  52. # point to point ioctls
  53. define(`ppp_ioctls', `{
  54. PPPIOCGL2TPSTATS PPPIOCGCHAN PPPIOCATTCHAN PPPIOCDISCONN
  55. PPPIOCCONNECT PPPIOCSMRRU PPPIOCDETACH PPPIOCATTACH
  56. PPPIOCNEWUNIT PPPIOCGIDLE PPPIOCSDEBUG PPPIOCGDEBUG
  57. PPPIOCSACTIVE PPPIOCSPASS PPPIOCSNPMODE PPPIOCGNPMODE
  58. PPPIOCSCOMPRESS PPPIOCXFERUNIT PPPIOCSXASYNCMAP
  59. PPPIOCGXASYNCMAP PPPIOCSMAXCID PPPIOCSMRU PPPIOCGMRU
  60. PPPIOCSRASYNCMAP PPPIOCGRASYNCMAP PPPIOCGUNIT PPPIOCSASYNCMAP
  61. PPPIOCGASYNCMAP PPPIOCSFLAGS PPPIOCGFLAGS PPPIOCGCALLINFO
  62. PPPIOCBUNDLE PPPIOCGMPFLAGS PPPIOCSMPFLAGS PPPIOCSMPMTU
  63. PPPIOCSMPMRU PPPIOCGCOMPRESSORS PPPIOCSCOMPRESSOR PPPIOCGIFNAME
  64. }')