packages feed

Win32-dhcp-server-0.1: Win32-dhcp-server.cabal

Name:                Win32-dhcp-server
Synopsis:            Win32 DHCP Server Management API.
Version:             0.1
License:             BSD3
License-file:        LICENSE
Author:              Michael Steele
Maintainer:          mikesteele81@gmail.com
Copyright:           2013 Michael Steele
Homepage:            http://github.com/mikesteele81/win32-dhcp-server
Bug-Reports:         http://github.com/mikesteele81/win32-dhcp-server/issues
Category:            System
Build-type:          Simple
Cabal-version:       >=1.14
Tested-With:         GHC == 7.6.3
Stability:           provisional
Description:
  This package provides a partial binding to the Win32 DHCP Server Management
  API. Its purpose is to query and control a Microsoft DHCP server. Enough
  functionality is defined so so that Ipv4 client lease and reservation
  records can be manipulated from software.
  .
  Here are a few notes on the required environment:
  .
  * Only 32-bit executables are supported. This is mainly because pointers
    are assumed to be 4 bytes wide in a few places. Support for 64-bit
    executables may be added in the future.
  .
  * All library calls should be supported on Windows 7 or above.
  .
  /Simple Example and Usage/
  .
  @
  \-\- Print all MAC addresses with an active client lease
  module Main where
  .
  import Data.Ip
  import Data.Mac
  import System.Win32.DHCP
  .
  main :: IO ()
  main = do
  &#x20;   api <- loadDHCP
  &#x20;   clients <- enumClients api context
  &#x20;   let macs = map (showMac \":\" . clientHardwareAddress) clients
  &#x20;   mapM_ putStrLn macs
  &#x20; where
  &#x20;   Just subnet = readIp \"192.168.1.0\"
  &#x20;   context = Context \"192.168.1.5\" subnet
  @

Library
  Build-depends: base  >= 4.6 && < 4.8
               , safe
               , Win32
  default-language: Haskell2010
  Exposed-modules: Data.Ip
                 , Data.Mac
                 , System.Win32.DHCP
  Ghc-Options: -funbox-strict-fields -Wall
  other-modules: Utils
               , System.Win32.DHCP.Internal
               , System.Win32.DHCP.Client
               , System.Win32.DHCP.CLIENT_UID
               , System.Win32.DHCP.DhcpStructure
               , System.Win32.DHCP.HOST_INFO
               , System.Win32.DHCP.IP_CLUSTER
               , System.Win32.DHCP.IP_RANGE
               , System.Win32.DHCP.LengthBuffer
               , System.Win32.DHCP.SEARCH_INFO
               , System.Win32.DHCP.Reservation
               , System.Win32.DHCP.SUBNET_CLIENT_INFO_ARRAY_V4
               , System.Win32.DHCP.SUBNET_ELEMENT_DATA_V4
               , System.Win32.DHCP.SUBNET_ELEMENT_INFO_ARRAY_V4
               , System.Win32.DHCP.Types