-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdhcpdfs.go
53 lines (44 loc) · 861 Bytes
/
dhcpdfs.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package main
import (
"flag"
"github.com/hanwen/go-fuse/fuse"
"os"
"time"
)
type Leases struct {
IP string
MAC string
Starts time.Time
Ends time.Time
TSTP time.Time
CLTT time.Time
Active bool
UID string
Hostname string
VendorClass string
DirEntry fuse.DirEntry
}
const DATE_TIME_FORMAT = "2006/01/02 15:04:05"
const (
COPYRIGHT = "© 2015 Laurence Morgan\n"
VERSION = "0.1\n"
)
// these will be pushed out to flags eventually,
// hence the weird naming convention.
var (
f_mount_point string
f_lease_file string
)
func main() {
Flags()
Mount()
}
func Flags() {
flag.StringVar(&f_mount_point, "m", "", "mount point")
flag.StringVar(&f_lease_file, "l", "", "lease file")
flag.Parse()
if f_mount_point == "" || f_lease_file == "" {
flag.Usage()
os.Exit(1)
}
}