about ioctl

White May whitemay@263.net
Sun Oct 10 23:41:11 1999


Hello.I have read linux driver for Tulip 21140.I have a problem puzzeled me.
It provides a function named "private_ioctl".It has such codes:
  
        static int private_ioctl(struct device *dev,struct ifreq *rq,int cmd)
        {
                ........
       
               switch(cmd){
                   case SIOCDEVPRIVATE:
                       {
                               /* get the phy address  */
                       }
                    case SIOCDEVPRIVATE+1:
                       {
                               /*  set the special MII register */
                       }

                .........
        }        

   
My problem is:
    1.How can I use such codes?
    2.How can I add my own ioctl functions?


Hope you write me back soon.Thank you!