IS IPB

From LFS Manual
Jump to navigationJump to search

Introduction

The IP Bans packet is used to set a list of banned IP addresses on the host.

IS_IPB packet properties
Type Name Description
byte Size 8 + NumB * 4
byte Type ISP_IPB
byte ReqI 0 unless this is a reply to a TINY_IPB request
byte NumB number of bans in this packet
byte Sp0
byte Sp1
byte Sp2
byte Sp3
in_addr BanIPs [IPB_MAX_BANS] IP addresses, 0 to IPB_MAX_BANS (NumB)

Packet Details

Size

The size of the packet varies from 8 to 488 bytes depending on the value of NumB.

Type

The packet type from the ISP_ enumeration, always ISP_IPB.

ReqI

ReqI is equal to zero, unless the packet is a reply to a TINY_IPB request.

NumB

The number of IP addresses in this packet.

BanIPs

The list of banned IPs, each byte represents a part of an IPv4 address (bytes 127-0-0-1 represent IP address 127.0.0.1). IPv6 is not supported.

Notes

This packet can set up to 120 IP bans. To remove all bans, send this packet with 0 IPs.