diff --git a/src/main/java/com/loafle/overflow/model/discovery/type/PortType.java b/src/main/java/com/loafle/overflow/model/discovery/type/PortType.java deleted file mode 100644 index 21fa8bc..0000000 --- a/src/main/java/com/loafle/overflow/model/discovery/type/PortType.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.loafle.overflow.model.discovery.type; - -/** - * Created by snoop on 17. 6. 27. - */ -public enum PortType { - TCP("TCP"), - UDP("UDP"), - TLS("TLS"); - - private String stringValue; - PortType(String string) {stringValue = string;} - - @Override - public String toString() { - return stringValue; - } -} \ No newline at end of file diff --git a/src/main/java/com/loafle/overflow/model/infra/InfraHost.java b/src/main/java/com/loafle/overflow/model/infra/InfraHost.java index 71980da..7abfe06 100644 --- a/src/main/java/com/loafle/overflow/model/infra/InfraHost.java +++ b/src/main/java/com/loafle/overflow/model/infra/InfraHost.java @@ -12,9 +12,10 @@ import java.util.Date; public class InfraHost extends Infra { // private long id; private InfraOS os; - private long ip; - private long mac; - private Date createDate; + private String ipV4; + private String ipV6; + private String mac; + private Date createDate; // @Id // @GeneratedValue(strategy= GenerationType.IDENTITY) @@ -38,21 +39,31 @@ public class InfraHost extends Infra { @Basic @Column(name = "IP", nullable = true) - public long getIp() { - return ip; + public String getIpV4() { + return ipV4; } - public void setIp(long ip) { - this.ip = ip; + public void setIpV4(String ipV4) { + this.ipV4 = ipV4; + } + + @Basic + @Column(name = "IP", nullable = true) + public String getIpV6() { + return ipV6; + } + + public void setIpV6(String ipV4) { + this.ipV6 = ipV4; } @Basic @Column(name = "MAC", nullable = true) - public long getMac() { + public String getMac() { return mac; } - public void setMac(long mac) { + public void setMac(String mac) { this.mac = mac; } diff --git a/src/main/java/com/loafle/overflow/model/sensorconfig/Connection.java b/src/main/java/com/loafle/overflow/model/sensorconfig/Connection.java index ad5fd26..315585e 100644 --- a/src/main/java/com/loafle/overflow/model/sensorconfig/Connection.java +++ b/src/main/java/com/loafle/overflow/model/sensorconfig/Connection.java @@ -6,17 +6,17 @@ import com.loafle.overflow.core.type.PortType; * Connection */ public class Connection { - private String ip; + private String ipV4; private int port; private PortType portType; private boolean ssl; - public String getIp() { - return ip; + public String getIpV4() { + return ipV4; } - public void setIp(String ip) { - this.ip = ip; + public void getIpV4(String ipV4) { + this.ipV4 = ipV4; } public int getPort() { diff --git a/src/main/java/com/loafle/overflow/service/central/infra/InfraHostService.java b/src/main/java/com/loafle/overflow/service/central/infra/InfraHostService.java index 35111a8..8f799f1 100644 --- a/src/main/java/com/loafle/overflow/service/central/infra/InfraHostService.java +++ b/src/main/java/com/loafle/overflow/service/central/infra/InfraHostService.java @@ -10,5 +10,5 @@ import com.loafle.overflow.model.infra.InfraHost; public interface InfraHostService { InfraHost regist(InfraHost infraHost) throws OverflowException; InfraHost read(long id) throws OverflowException; - InfraHost readByIp(long ip) throws OverflowException; + InfraHost readByIp(String ip) throws OverflowException; }