AttackRecord.java 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. package de.tudarmstadt.informatik.hostage.logging;
  2. import java.io.Serializable;
  3. import android.os.Parcel;
  4. import android.os.Parcelable;
  5. public class AttackRecord implements Parcelable, Serializable{
  6. private static final long serialVersionUID = 6111024905373724227L;
  7. private long attack_id;
  8. private String bssid;
  9. private String protocol;
  10. private String localIP;
  11. private int localPort;
  12. private String remoteIP;
  13. private int remotePort;
  14. private String externalIP;
  15. public static final Parcelable.Creator<AttackRecord> CREATOR = new Parcelable.Creator<AttackRecord>() {
  16. @Override
  17. public AttackRecord createFromParcel(Parcel source) {
  18. return new AttackRecord(source);
  19. }
  20. @Override
  21. public AttackRecord[] newArray(int size) {
  22. return new AttackRecord[size];
  23. }
  24. };
  25. public AttackRecord() {
  26. }
  27. public AttackRecord(Parcel source) {
  28. this.attack_id = source.readLong();
  29. this.protocol = source.readString();
  30. this.localIP = source.readString();
  31. this.localPort = source.readInt();
  32. this.remoteIP = source.readString();
  33. this.remotePort = source.readInt();
  34. this.externalIP = source.readString();
  35. this.bssid = source.readString();
  36. }
  37. @Override
  38. public int describeContents() {
  39. return 0;
  40. }
  41. @Override
  42. public void writeToParcel(Parcel dest, int flags) {
  43. dest.writeLong(attack_id);
  44. dest.writeString(protocol);
  45. dest.writeString(localIP);
  46. dest.writeInt(localPort);
  47. dest.writeString(remoteIP);
  48. dest.writeInt(remotePort);
  49. dest.writeString(externalIP);
  50. dest.writeString(bssid);
  51. }
  52. /**
  53. * @return the attack_id
  54. */
  55. public long getAttack_id() {
  56. return attack_id;
  57. }
  58. /**
  59. * @param attack_id the attack_id to set
  60. */
  61. public void setAttack_id(long attack_id) {
  62. this.attack_id = attack_id;
  63. }
  64. /**
  65. * @return the bssid
  66. */
  67. public String getBssid() {
  68. return bssid;
  69. }
  70. /**
  71. * @param bssid the bssid to set
  72. */
  73. public void setBssid(String bssid) {
  74. this.bssid = bssid;
  75. }
  76. /**
  77. * @return the protocol
  78. */
  79. public String getProtocol() {
  80. return protocol;
  81. }
  82. /**
  83. * @param protocol the protocol to set
  84. */
  85. public void setProtocol(String protocol) {
  86. this.protocol = protocol;
  87. }
  88. /**
  89. * @return the localIP
  90. */
  91. public String getLocalIP() {
  92. return localIP;
  93. }
  94. /**
  95. * @param localIP the localIP to set
  96. */
  97. public void setLocalIP(String localIP) {
  98. this.localIP = localIP;
  99. }
  100. /**
  101. * @return the localPort
  102. */
  103. public int getLocalPort() {
  104. return localPort;
  105. }
  106. /**
  107. * @param localPort the localPort to set
  108. */
  109. public void setLocalPort(int localPort) {
  110. this.localPort = localPort;
  111. }
  112. /**
  113. * @return the remoteIP
  114. */
  115. public String getRemoteIP() {
  116. return remoteIP;
  117. }
  118. /**
  119. * @param remoteIP the remoteIP to set
  120. */
  121. public void setRemoteIP(String remoteIP) {
  122. this.remoteIP = remoteIP;
  123. }
  124. /**
  125. * @return the remotePort
  126. */
  127. public int getRemotePort() {
  128. return remotePort;
  129. }
  130. /**
  131. * @param remotePort the remotePort to set
  132. */
  133. public void setRemotePort(int remotePort) {
  134. this.remotePort = remotePort;
  135. }
  136. /**
  137. * @return the externalIP
  138. */
  139. public String getExternalIP() {
  140. return externalIP;
  141. }
  142. /**
  143. * @param externalIP the externalIP to set
  144. */
  145. public void setExternalIP(String externalIP) {
  146. this.externalIP = externalIP;
  147. }
  148. }