This commit is contained in:
2024-11-29 16:41:26 +08:00
parent 69caff37c2
commit 2d3d7d64d5
11 changed files with 573 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
package cn.x47.model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.net.InetSocketAddress;
import java.util.List;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class RIPPacket {
private byte command; // 1=Request, 2=Response
private byte version; // 1=RIP v1, 2=RIP v2
private short unused = 0; // 未使用,设置为 0
private List<RIPEntry> entries;
private InetSocketAddress senderAddress;
// 添加构造方法和 Getter/Setter
public RIPPacket(byte command, byte version, List<RIPEntry> entries) {
this.command = command;
this.version = version;
this.unused = 0;
this.entries = entries;
}
}