Move npf_sys_is_running() from wsutil to caputils.
authorGuy Harris <guy@alum.mit.edu>
Fri, 3 Jun 2016 20:29:43 +0000 (13:29 -0700)
committerGuy Harris <guy@alum.mit.edu>
Fri, 3 Jun 2016 21:24:47 +0000 (21:24 +0000)
commita6618ffdc9ed8ad28aeecf902b45c39e2f3b9d93
tree1f452d73017783e076697e54b9e2e68e0dd23f89
parent018765f41af15855df87b183e337f0371cfa8a17
Move npf_sys_is_running() from wsutil to caputils.

It has nothing to do with controlling privileges; it only tests whether
the NPF or Npcap service (driver) is running, so it belongs in caputils.

While we're at it, fix its signature (in C, a function with no arguments
must have "void" as the argument list, for backwards compatibility with
pre-function-prototype C), and close the handles it opens, so we don't
have open handles leaked.

Change-Id: Ia99e99d81617ed2e8cda2c44e53061b4502a2b58
Reviewed-on: https://code.wireshark.org/review/15714
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
caputils/capture-wpcap.c
caputils/capture-wpcap.h
wsutil/privileges.c
wsutil/privileges.h