aboutsummaryrefslogtreecommitdiffstats
path: root/prog
diff options
context:
space:
mode:
authorAndrey Konovalov <andreyknvl@google.com>2016-11-28 16:11:15 +0100
committerAndrey Konovalov <andreyknvl@google.com>2016-11-29 16:39:02 +0100
commit86917cc3a79ef74eb06748dc964988f48e6b66a1 (patch)
tree8a693c0b1098299c5d67af9634f4ea340dfd3c7e /prog
parent4278c63e64234425ea1655e3207d85b627fc17f2 (diff)
sys: move in_addr description to templates
Diffstat (limited to 'prog')
-rw-r--r--prog/prio.go2
-rw-r--r--prog/rand.go33
2 files changed, 0 insertions, 35 deletions
diff --git a/prog/prio.go b/prog/prio.go
index f503257ad..8c05bda1e 100644
--- a/prog/prio.go
+++ b/prog/prio.go
@@ -99,8 +99,6 @@ func calcStaticPriorities() [][]float32 {
case sys.IntPlain, sys.IntFileoff, sys.IntRange:
case sys.IntSignalno:
noteUsage(1.0, "signalno")
- case sys.IntInaddr:
- noteUsage(1.0, "inaddr")
default:
panic("unknown int kind")
}
diff --git a/prog/rand.go b/prog/rand.go
index 3d25711e5..bdcc89152 100644
--- a/prog/rand.go
+++ b/prog/rand.go
@@ -193,29 +193,6 @@ func (r *randGen) inport(s *state) uint16 {
return uint16(r.Intn(20))<<8 + 0xab
}
-func (r *randGen) in6addr(s *state, typ sys.Type) (arg *Arg, calls []*Call) {
- // addr: loopback (big endian)
- return groupArg(typ, []*Arg{
- constArg(nil, 0),
- constArg(nil, 0),
- constArg(nil, 0),
- constArg(nil, 1<<24),
- }), nil
-}
-
-func (r *randGen) inaddrany(s *state, typ sys.Type) (arg *Arg, calls []*Call) {
- if r.bin() {
- return r.in6addr(s, typ)
- } else {
- return groupArg(typ, []*Arg{
- constArg(nil, uintptr(r.inaddr(s))),
- constArg(nil, 0),
- constArg(nil, 0),
- constArg(nil, 0),
- }), nil
- }
-}
-
func (r *randGen) sockaddr(s *state) []byte {
fa := sockFamilies[r.Intn(len(sockFamilies))]
buf := new(bytes.Buffer)
@@ -315,14 +292,6 @@ func isSpecialStruct(typ sys.Type) func(r *randGen, s *state) (*Arg, []*Call) {
return func(r *randGen, s *state) (*Arg, []*Call) {
return r.timespec(s, a, true)
}
- case "in6_addr":
- return func(r *randGen, s *state) (*Arg, []*Call) {
- return r.in6addr(s, a)
- }
- case "in_addr_any":
- return func(r *randGen, s *state) (*Arg, []*Call) {
- return r.inaddrany(s, a)
- }
}
return nil
}
@@ -718,8 +687,6 @@ func (r *randGen) generateArg(s *state, typ sys.Type) (arg *Arg, calls []*Call)
switch a.Kind {
case sys.IntSignalno:
v %= 130
- case sys.IntInaddr:
- v = uintptr(r.inaddr(s))
case sys.IntFileoff:
r.choose(
90, func() { v = 0 },