Call function on sysctl value change - FreeBSD

This is a discussion on Call function on sysctl value change - FreeBSD ; Hi all, I was wondering if it is possible to call a function when a sysctl value is changed. I have added a few sysctl int variables to the kernel and for some of these i only want certain values ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Call function on sysctl value change

  1. Call function on sysctl value change

    Hi all,

    I was wondering if it is possible to call a function when a sysctl value is
    changed. I have added a few sysctl int variables to the kernel and for some
    of these i only want certain values to be acceptable as input depending on
    some conditions. I would like to be able to call a function if possible, to
    validate the value entered via the sysctl command.

    Thanks in advance
    Matt
    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/lis...reebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"


  2. Re: Call function on sysctl value change

    On Wednesday 15 October 2008, Dag-Erling Smørgrav wrote:
    > Dag-Erling Smørgrav writes:
    > > Matthew Jakeman writes:
    > > > I was wondering if it is possible to call a function when a sysctl
    > > > value is changed.

    > >
    > > grep -r SYSCTL_ADD_PROC /usr/src/sys

    >
    > even better: 'man SYSCTL_ADD_PROC' will answer all your questions.
    >
    > DES


    Thanks for that. It looks like just the job. Now exactly sure how I missed it
    in the first place but thanks...
    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/lis...reebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"


+ Reply to Thread