/*$Id: choke_error.h,v 1.3 1999/04/28 19:49:02 jeremiah Exp $
$Log: choke_error.h,v $
Revision 1.3  1999/04/28 19:49:02  jeremiah
finailized function prototypes unload and load (added int * to both)

Revision 1.2  1999/04/28 19:27:05  jeremiah
Entered errors

*/
#include <sys/types.h>
#include <sys/param.h>
#include <sys/proc.h>
#include <sys/module.h>
#include <sys/sysent.h>
#include <sys/kernel.h>
#include <sys/systm.h>
#include <sys/sysctl.h>
#include <sys/socket.h> 
#include <netinet/in.h>
#include <sys/errno.h>
#include <err.h>
#include <unistd.h>
#include <sys/param.h>
#include <sys/linker.h>

void print_usage();
void load(char *,int *);
void unload(char *,int *);
void print_error();


void print_usage(){
  printf("Usage: chokecall <load | unload>\n");
  exit(-1);
}

void print_error(){

  printf("checking error..\n");
  switch (errno) {
  case EFAULT :
    printf("The buffer name, oldp, newp, or length pointer oldlenp con-
tains an invalid address.\n");
    break;
  case EINVAL :
    printf("A non-null newp is given and its specified length in newlen
is too large or too small.\n");
    break;
  case ENOMEM :
    printf("The length pointed to by oldlenp is too short to hold the
requested value.\n");
    break;
  case ENOTDIR :
    printf("The name array specifies an intermediate rather than termi-
nal name.\n");
    break;
  case EOPNOTSUPP :
    printf("The name array specifies a value that is unknown.\n");
    break;
  case EPERM :
    printf(" A process without appropriate privilege attempts to set a
value.\n");
  default :
    printf("errno = %d\n",errno);
  }
}
