X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fipsec-secgw%2Fsa.c;h=8a3d89497b841fcbdb23b086c0ba4e2299f5f265;hb=24ac604ef7469eb5773c2504b313dd00257f8df3;hp=b850e9839e564582512768cfd0b9494504aaf7f9;hpb=49757b6845835394d1a9a6efad9356a6da58fd85;p=dpdk.git diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c index b850e9839e..8a3d89497b 100644 --- a/examples/ipsec-secgw/sa.c +++ b/examples/ipsec-secgw/sa.c @@ -951,7 +951,7 @@ get_spi_proto(uint32_t spi, enum rte_security_ipsec_sa_direction dir) if (rc6 >= 0) { RTE_LOG(ERR, IPSEC, "%s: SPI %u used simultaeously by " - "IPv4(%d) and IPv6 (%d) SP rules\n", + "RTE_IPv4(%d) and IPv6 (%d) SP rules\n", __func__, spi, rc4, rc6); return -EINVAL; } else @@ -967,7 +967,7 @@ get_spi_proto(uint32_t spi, enum rte_security_ipsec_sa_direction dir) static int fill_ipsec_sa_prm(struct rte_ipsec_sa_prm *prm, const struct ipsec_sa *ss, - const struct ipv4_hdr *v4, struct ipv6_hdr *v6) + const struct rte_ipv4_hdr *v4, struct rte_ipv6_hdr *v6) { int32_t rc; @@ -1038,15 +1038,15 @@ ipsec_sa_init(struct ipsec_sa *lsa, struct rte_ipsec_sa *sa, uint32_t sa_size) { int rc; struct rte_ipsec_sa_prm prm; - struct ipv4_hdr v4 = { + struct rte_ipv4_hdr v4 = { .version_ihl = IPVERSION << 4 | - sizeof(v4) / IPV4_IHL_MULTIPLIER, + sizeof(v4) / RTE_IPV4_IHL_MULTIPLIER, .time_to_live = IPDEFTTL, .next_proto_id = IPPROTO_ESP, .src_addr = lsa->src.ip.ip4, .dst_addr = lsa->dst.ip.ip4, }; - struct ipv6_hdr v6 = { + struct rte_ipv6_hdr v6 = { .vtc_flow = htonl(IP6_VERSION << 28), .proto = IPPROTO_ESP, }; @@ -1219,7 +1219,7 @@ static inline void single_inbound_lookup(struct ipsec_sa *sadb, struct rte_mbuf *pkt, struct ipsec_sa **sa_ret) { - struct esp_hdr *esp; + struct rte_esp_hdr *esp; struct ip *ip; uint32_t *src4_addr; uint8_t *src6_addr; @@ -1229,9 +1229,9 @@ single_inbound_lookup(struct ipsec_sa *sadb, struct rte_mbuf *pkt, ip = rte_pktmbuf_mtod(pkt, struct ip *); if (ip->ip_v == IPVERSION) - esp = (struct esp_hdr *)(ip + 1); + esp = (struct rte_esp_hdr *)(ip + 1); else - esp = (struct esp_hdr *)(((struct ip6_hdr *)ip) + 1); + esp = (struct rte_esp_hdr *)(((struct ip6_hdr *)ip) + 1); if (esp->spi == INVALID_SPI) return;