summaryrefslogtreecommitdiff
path: root/libpod/network
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2021-08-24 23:04:25 +0200
committerPaul Holzinger <pholzing@redhat.com>2021-09-15 20:00:28 +0200
commitb906b9d8581c6fe745509e386c5324d9c76b8801 (patch)
treef901034d8f1c69d8c6c788551c182095743cf38b /libpod/network
parent85e8fbf7f33717ef6a0d6cf9e2143b52c874c2de (diff)
downloadpodman-b906b9d8581c6fe745509e386c5324d9c76b8801.tar.gz
podman-b906b9d8581c6fe745509e386c5324d9c76b8801.tar.bz2
podman-b906b9d8581c6fe745509e386c5324d9c76b8801.zip
Drop OCICNI dependency
We do not use the ocicni code anymore so let's get rid of it. Only the port struct is used but we can copy this into libpod network types so we can debloat the binary. The next step is to remove the OCICNI port mapping form the container config and use the better PortMapping struct everywhere. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'libpod/network')
-rw-r--r--libpod/network/types/network.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/libpod/network/types/network.go b/libpod/network/types/network.go
index 56bde716e..ad46c9ac1 100644
--- a/libpod/network/types/network.go
+++ b/libpod/network/types/network.go
@@ -199,6 +199,20 @@ type PortMapping struct {
Protocol string `json:"protocol,omitempty"`
}
+// OCICNIPortMapping maps to the standard CNI portmapping Capability.
+// Deprecated, do not use this struct for new fields. This only exists
+// for backwards compatibility.
+type OCICNIPortMapping struct {
+ // HostPort is the port number on the host.
+ HostPort int32 `json:"hostPort"`
+ // ContainerPort is the port number inside the sandbox.
+ ContainerPort int32 `json:"containerPort"`
+ // Protocol is the protocol of the port mapping.
+ Protocol string `json:"protocol"`
+ // HostIP is the host ip to use.
+ HostIP string `json:"hostIP"`
+}
+
type SetupOptions struct {
NetworkOptions
}