// Set pull-up configuration for port B. If a bit is 1 and the corresponding pin is
// an input, a pull-up resistor of about 100K is enabled. A zero bit indicates no pull-up.
181760
func (d *MCP23017) SetPullupB(value byte) error {
	return d.device.WriteByte(REG_GPPUB, value)
}
613460
func (s *LocalPortDetails) SetPort(v int64) *LocalPortDetails {
	s.Port = &v
	return s
}
779827
func (s *OriginationRoute) SetPort(v int64) *OriginationRoute {
	s.Port = &v
	return s
}
238319
func (s *KeyPair) SetSupportCode(v string) *KeyPair {
	s.SupportCode = &v
	return s
}
473128
func setBit(n int, pos int) int {
	n |= (1 << uint(pos))
	return n
}
872561
func (s *LoadBalancer) SetSupportCode(v string) *LoadBalancer {
	s.SupportCode = &v
	return s
}
681671
func (s *ServiceRegistry) SetPort(v int64) *ServiceRegistry {
	s.Port = &v
	return s
}
1242597
func (s *NetworkProfile) SetUplinkBandwidthBits(v int64) *NetworkProfile {
	s.UplinkBandwidthBits = &v
	return s
}
731847
func (l *limit) Wireup(bldr builder, jt *jointab) error {
	return l.input.Wireup(bldr, jt)
}
383975
func (c *conn) SetOption(option ConnOption, enable bool) error {
	o, ok := linuxOption(option)
	if !ok {
		// Return the typical Linux error for an unknown ConnOption.
		return os.NewSyscallError("setsockopt", unix.ENOPROTOOPT)
	}

	var v int
	if enable {
		v = 1
	}

	return os.NewSyscallError("setsockopt", c.s.SetSockoptInt(
		unix.SOL_NETLINK,
		o,
		v,
	))
}
1206539
func (s *Listener) SetPort(v int64) *Listener {
	s.Port = &v
	return s
}
649778
func (s *GameSessionPlacement) SetPort(v int64) *GameSessionPlacement {
	s.Port = &v
	return s
}
1038101
func (p *PortDefinition) SetPort(port int) *PortDefinition {
	if p.Port == nil {
		p.EmptyPort()
	}
	p.Port = &port
	return p
}
1065809
func (p *packetConn) SetBPF(filter []bpf.RawInstruction) error {
	prog := unix.SockFprog{
		Len:    uint16(len(filter)),
		Filter: (*unix.SockFilter)(unsafe.Pointer(&filter[0])),
	}

	err := p.s.SetSockoptSockFprog(
		unix.SOL_SOCKET,
		unix.SO_ATTACH_FILTER,
		&prog,
	)
	if err != nil {
		return os.NewSyscallError("setsockopt", err)
	}
	return nil
}
1160411
func (soc *Socket) SetXpubNodrop(value bool) error {
	if minor < 1 {
		return ErrorNotImplemented41
	}
	val := 0
	if value {
		val = 1
	}
	return soc.setInt(C.ZMQ_XPUB_NODROP, val)
}
947279
func configureBPF(fd int, ifi *net.Interface, proto uint16) (int, error) {
	// Use specified interface with BPF device
	if err := syscall.SetBpfInterface(fd, ifi.Name); err != nil {
		return 0, err
	}

	// Inform BPF to send us its data immediately
	if err := syscall.SetBpfImmediate(fd, 1); err != nil {
		return 0, err
	}

	// Check buffer size of BPF device
	buflen, err := syscall.BpfBuflen(fd)
	if err != nil {
		return 0, err
	}

	// Do not automatically complete source address in ethernet headers
	if err := syscall.SetBpfHeadercmpl(fd, 1); err != nil {
		return 0, err
	}

	// Only retrieve incoming traffic using BPF device
	if err := setBPFDirection(fd, bpfDIn); err != nil {
		return 0, err
	}

	// Build and apply base BPF filter which checks for correct EtherType
	// on incoming packets
	prog, err := bpf.Assemble(baseInterfaceFilter(proto, ifi.MTU))
	if err != nil {
		return 0, err
	}
	if err := syscall.SetBpf(fd, assembleBpfInsn(prog)); err != nil {
		return 0, err
	}

	// Flush any packets currently in the BPF device's buffer
	if err := syscall.FlushBpf(fd); err != nil {
		return 0, err
	}

	return buflen, nil
}
1022404
func (ps *pulloutSubquery) Wireup(bldr builder, jt *jointab) error {
	if err := ps.underlying.Wireup(bldr, jt); err != nil {
		return err
	}
	return ps.subquery.Wireup(bldr, jt)
}