/*++

    Copyright (c) Microsoft Corporation.  All rights reserved.

Rule Name:

    NdisFDeregisterFilterDriver

Domain:

    ndis

Rule ID:

    Not Applicable

Description:

    A filter driver must call NdisFDeregisterFilterDriver from its FilterDriverUnload routine.

    Related Rule:

Help Link:

    https://go.microsoft.com/fwlink/?LinkId=507191

--*/




#include "slic_base.h"

state
{
   enum {initial,registered, unregistered} filter_state = initial;
}

NdisFRegisterFilterDriver.exit
{
  if($return==NDIS_STATUS_SUCCESS)
  {
      filter_state = registered;
  }
}

NdisFDeregisterFilterDriver.entry
{
  filter_state = unregistered;
}


fun_FILTER_DRIVER_UNLOAD.exit
{
       if (filter_state == registered) 
       {
            abort "You need to call NdisFDeregisterFilterDriver in $fname.";
       }
}
