DEENESPTFRRUARHIKOZHNL

TCP/IP Stack (TcpIp)

ModulTcpIp (TCP/IP Stack)
BSW-Modul-ID170
Standard-Header#include "TcpIp.h"
SWS-SpezifikationAUTOSAR_SWS_TcpIp.pdf
ClusterEthernet Services

ModulegidsAI-GEGENEREERD

Stelt in de Ethernet-stack IP-communicatie via TCP en UDP inclusief adresbeheer beschikbaar voor hogere lagen.
DOOR AI GEGENEREERD ongecontroleerd Model: claude-opus-5-5 · Inspanning: high · Temperatuur: niet regelbaar · Prompt: 0a4cda5ef1d2 Herkomst Open vragen (3)
Causaal anker: R20-11 Geldig vanaf R20-11 Nieuw gesynthetiseerd voor deze specificatiestand.
vertaald uit de Duitse handleidinggemini-3.8-flash-low · 2026-10-13 · Duits origineel

Stelt in de Ethernet-stack IP-communicatie via TCP en UDP inclusief adresbeheer beschikbaar voor hogere lagen.

TcpIp stelt in de Classic-Ethernet-stack IPv4 en IPv6 met ARP, NDP, ICMP en DHCP evenals UDP en TCP beschikbaar en bedient daarmee socket-owners zoals de SoAd [SWS_TCPIP_00052]. De EthSM bestuurt voor elke EthIf-controller de toestanden ONLINE, ONHOLD en OFFLINE. Een controller wordt pas ONLINE wanneer er een lokaal adres aan is toegewezen [SWS_TCPIP_00085]. Sockets worden aangevraagd, gebonden en bij TCP actief of passief verbonden; de gegevens lopen via verzendservices en callbacks. Belangrijkste randvoorwaarde: Nieuwe TCP-verbindingen accepteert TcpIp alleen in de toestand ONLINE, en in ONHOLD wijst het nieuwe verzendopdrachten af.

In de Classic-Ethernet-stack is TcpIp verantwoordelijk voor de IP-communicatie. Het bestaat uit deelmodules voor IPv4 (met ARP, ICMP, DHCP en Auto-IP), voor IPv6 (met NDP, ICMPv6 en DHCPv6) evenals voor UDP, TCP en TLS ([SWS_TCPIP_00052], [SWS_TCPIP_00150]). Naar boven bedient het socket-owners, oftewel de SoAd of CDD's, met eigen TcpIp_<Up>GetSocket-functies en callbacks ([SWS_TCPIP_00220], [SWS_TCPIP_00222]). Naar onder wisselt het frames uit met EthIf [SWS_TCPIP_00029].

kontext EthSM EthSM TcpIp TcpIp IPv4 / ARP / ICMP / DHCP / Auto-IP IPv6 / NDP / ICMPv6 / DHCPv6 UDP / TCP / TLS / IPsec EthSM->TcpIp TcpIp_RequestComMode SoAd SoAd (Socket-Owner SOAD) SoAd->TcpIp TcpIp_SoAdGetSocket, TcpIp_Bind, TcpIp_TcpTransmit, TcpIp_UdpTransmit CDD CDD (Socket-Owner CDD) CDD->TcpIp TcpIp_<Up>GetSocket, Transmit-Dienste TcpIp->SoAd SoAd_RxIndication, SoAd_TxConfirmation, SoAd_TcpAccepted, SoAd_LocalIpAddrAssignmentChg TcpIp->CDD konfigurierte Callback-Namen EthIf EthIf TcpIp->EthIf EthIf_ProvideTxBuffer, EthIf_Transmit Det Det TcpIp->Det Ontwikkelings- en runtimefouten Csm Csm (optional) TcpIp->Csm Krypto-Dienste (TLS) IdsM IdsM (optional) TcpIp->IdsM Sicherheitsereignisse NvM NvM-Block (TCPIP_STORE) TcpIp->NvM gespeicherte IP-Adressen EthIf->TcpIp TcpIp_RxIndication

Contextdiagram: TcpIp bevindt zich tussen de socket-owners en EthIf, wordt bestuurd door de EthSM en meldt aan DET en IdsM. Bronnen: [SWS_TCPIP_00220], [SWS_TCPIP_00070], [SWS_TCPIP_00361], SWS TcpIp p. 17

De communicatietoestand houdt TcpIp voor elke EthIf-controller afzonderlijk bij [SWS_TCPIP_00083]. De EthSM vraagt via TcpIp_RequestComMode een van de toestanden ONLINE, ONHOLD of OFFLINE aan [SWS_TCPIP_00070]. STARTUP en SHUTDOWN zijn overgangstoestanden en kunnen niet worden aangevraagd [SWS_TCPIP_00089]. ONLINE start de adrestoewijzing. ONHOLD behoudt sockets en adressen, maar accepteert geen verzendopdrachten. OFFLINE sluit de sockets ([SWS_TCPIP_00075], [SWS_TCPIP_00074], [SWS_TCPIP_00072]).

zustand Start Start OFFLINE TCPIP_STATE_OFFLINE Start->OFFLINE TcpIp_Init() STARTUP TCPIP_STATE_STARTUP OFFLINE->STARTUP RequestComMode(ONLINE) / Adresszuweisungen aktivieren STARTUP->OFFLINE RequestComMode(OFFLINE) / Zuweisungen abbrechen ONLINE TCPIP_STATE_ONLINE STARTUP->ONLINE erste Adresse zugewiesen / <Up>_LocalIpAddrAssignmentChg(ASSIGNED) ONHOLD TCPIP_STATE_ONHOLD ONLINE->ONHOLD RequestComMode(ONHOLD) / ...(ONHOLD), Kommunikation deaktivieren SHUTDOWN TCPIP_STATE_SHUTDOWN ONLINE->SHUTDOWN RequestComMode(OFFLINE) of alle adressen vrijgegeven / ...(UNASSIGNED), sockets sluiten ONHOLD->ONLINE RequestComMode(ONLINE) / reaktivieren, ...(ASSIGNED) ONHOLD->SHUTDOWN RequestComMode(OFFLINE) / ...(UNASSIGNED) SHUTDOWN->OFFLINE Ressourcen freigegeben

Toestandsdiagram: Een controller wordt pas ONLINE wanneer er een adres aan is toegewezen. De weg naar OFFLINE verloopt via SHUTDOWN, waarin de resources worden vrijgegeven. Bronnen: [SWS_TCPIP_00085], [SWS_TCPIP_00077], [SWS_TCPIP_00087], SWS TcpIp p. 60

De adressen zijn afkomstig uit een geconfigureerde tabel van lokale adressen. Ze worden statisch, via DHCP of als link-local toegewezen, op prioriteit geselecteerd en desgewenst in het NvM opgeslagen ([SWS_TCPIP_00099], [SWS_TCPIP_00065], [SWS_TCPIP_00127], [SWS_TCPIP_00219]). Over wijzigingen informeert <Up_LocalIpAddrAssignmentChg> de hogere laag [SWS_TCPIP_00229]. Sockets worden aangevraagd en met TcpIp_Bind gebonden. TCP-verbindingen ontstaan via TcpIp_TcpConnect of TcpIp_TcpListen ([SWS_TCPIP_00111], [SWS_TCPIP_00112], [SWS_TCPIP_00113]).

Verzenden gebeurt asynchroon via TcpIp_TcpTransmit of synchroon via TcpIp_UdpTransmit. Bij TCP draagt de hogere laag de gegevens direct over of stelt deze beschikbaar via <Up_CopyTxData> ([SWS_TCPIP_00124], [SWS_TCPIP_00120]). Ontvangen datagrammen wijst TcpIp via lokaal adres en poort toe aan een socket [SWS_TCPIP_00170]. Ontbreekt het MAC-adres van de bestemming, dan bepaalt TcpIpArpPacketQueueEnabled of het pakket in de wachtrij wordt geplaatst of wordt afgewezen [SWS_TCPIP_00192]. Runtime-fouten zoals timeouts, onbereikbare hosts of adresconflicten meldt TcpIp aan de DET. In R20-11 zijn daarvoor de codes 0x01 tot en met 0x05 gedefinieerd [SWS_TCPIP_00255]. Voor de beveiliging komen daar TLS vanaf versie 1.2 en IPsec met IKEv2 bij ([SWS_TCPIP_00302], [SWS_TCPIP_00353]).

Rol in de Ethernet-stack: bemiddelaar tussen socket-owners en EthIf

TcpIp bundelt de IP-gebaseerde communicatie van een Classic-regeleenheid in deelmodules [SWS_TCPIP_00052]. Voor IPv4 zijn IP, ARP, ICMP, DHCPv4 (client en server), Auto-IP, UDP en TCP vereist ([SWS_TCPIP_00053], [SWS_TCPIP_00056], [SWS_TCPIP_00058], [SWS_TCPIP_00057], [SWS_TCPIP_00061]). Voor IPv6 komen daar IPv6, NDP, ICMPv6 en een DHCPv6-client bij ([SWS_TCPIP_00160], [SWS_TCPIP_00164], [SWS_TCPIP_00166]). Drie schaalklassen bakenen de omvang af: IPv4-stack, IPv6-stack en dual stack SWS TcpIp p. 18. Voor klasse 3 is de volledige omvang bindend [SWS_TCPIP_00150].

Naar boven bedient TcpIp socket-owners. Als TcpIpSocketOwnerUpperLayerType is ingesteld op SOAD, heten de callbacks SoAd_…. Bij CDD gelden de geconfigureerde functienamen ([SWS_TCPIP_00220], [SWS_TCPIP_00221]). Elke owner krijgt een eigen TcpIp_<Up>GetSocket-functie, en de zo aangevraagde sockets behoren exclusief toe aan hem [SWS_TCPIP_00222].

Naar onder ontvangt TcpIp frames via TcpIp_RxIndication [SWS_TCPIP_00029]. Het verzendt via EthIf_Transmit, en wel altijd met TxConfirmation = FALSE [SWS_TCPIP_00131]. De toestand wordt bestuurd door de EthSM via TcpIp_RequestComMode SWS EthSM p. 27. Optioneel maakt TcpIp gebruik van CSM-services [SWS_TCPIP_00028] en meldt het beveiligingsgebeurtenissen aan de IdsM [SWS_TCPIP_00361]. Een overzicht van de inbedding biedt SWS TcpIp p. 17.

kontext EthSM EthSM TcpIp TcpIp IPv4 / ARP / ICMP / DHCP / Auto-IP IPv6 / NDP / ICMPv6 / DHCPv6 UDP / TCP / TLS / IPsec EthSM->TcpIp TcpIp_RequestComMode SoAd SoAd (Socket-Owner SOAD) SoAd->TcpIp TcpIp_SoAdGetSocket, TcpIp_Bind, TcpIp_TcpTransmit, TcpIp_UdpTransmit CDD CDD (Socket-Owner CDD) CDD->TcpIp TcpIp_<Up>GetSocket, Transmit-Dienste TcpIp->SoAd SoAd_RxIndication, SoAd_TxConfirmation, SoAd_TcpAccepted, SoAd_LocalIpAddrAssignmentChg TcpIp->CDD konfigurierte Callback-Namen EthIf EthIf TcpIp->EthIf EthIf_ProvideTxBuffer, EthIf_Transmit Det Det TcpIp->Det Ontwikkelings- en runtimefouten Csm Csm (optional) TcpIp->Csm Krypto-Dienste (TLS) IdsM IdsM (optional) TcpIp->IdsM Sicherheitsereignisse NvM NvM-Block (TCPIP_STORE) TcpIp->NvM gespeicherte IP-Adressen EthIf->TcpIp TcpIp_RxIndication

Contextdiagram: TcpIp bevindt zich tussen de socket-owners (SoAd of CDD) en EthIf. Het wordt bestuurd door de EthSM, meldt fouten aan de DET en gebeurtenissen aan de IdsM en maakt optioneel gebruik van de CSM. Bronnen: [SWS_TCPIP_00220], [SWS_TCPIP_00222], [SWS_TCPIP_00029], [SWS_TCPIP_00070], [SWS_TCPIP_00028], [SWS_TCPIP_00361], [SWS_TCPIP_00255], [SWS_TCPIP_00219], SWS TcpIp p. 17

Controllertoestanden: van TCPIP_STATE_OFFLINE naar TCPIP_STATE_ONLINE

De module wordt geïnitialiseerd met TcpIp_Init en een implementatiespecifieke TcpIp_ConfigType ([SWS_TCPIP_00002], [SWS_TCPIP_00067]). TcpIp_MainFunction is het ingangspunt voor de scheduler [SWS_TCPIP_00026]. Interpretatie: Daar zouden tijdgestuurde processen zoals timeouts kunnen aflopen. Vraag Q-77b083e447651768 (open) De specificatie vermeldt daarover slechts „Schedules the TCP/IP stack”.

TcpIp houdt voor elke EthIf-controller een eigen toestand bij: OFFLINE, STARTUP, ONLINE, ONHOLD of SHUTDOWN [SWS_TCPIP_00083]. Wijkt het opgeslagen verzoek af van de actieve toestand, dan start TcpIp de nodige stappen [SWS_TCPIP_00136].

zustand Start Start OFFLINE TCPIP_STATE_OFFLINE Start->OFFLINE TcpIp_Init() STARTUP TCPIP_STATE_STARTUP OFFLINE->STARTUP RequestComMode(ONLINE) / Adresszuweisungen aktivieren STARTUP->OFFLINE RequestComMode(OFFLINE) / Zuweisungen abbrechen ONLINE TCPIP_STATE_ONLINE STARTUP->ONLINE erste Adresse zugewiesen / <Up>_LocalIpAddrAssignmentChg(ASSIGNED) ONHOLD TCPIP_STATE_ONHOLD ONLINE->ONHOLD RequestComMode(ONHOLD) / ...(ONHOLD), Kommunikation deaktivieren SHUTDOWN TCPIP_STATE_SHUTDOWN ONLINE->SHUTDOWN RequestComMode(OFFLINE) of alle adressen vrijgegeven / ...(UNASSIGNED), sockets sluiten ONHOLD->ONLINE RequestComMode(ONLINE) / reaktivieren, ...(ASSIGNED) ONHOLD->SHUTDOWN RequestComMode(OFFLINE) / ...(UNASSIGNED) SHUTDOWN->OFFLINE Ressourcen freigegeben

Toestandsdiagram: Elke EthIf-controller heeft een eigen toestandsautomaat. Alleen ONLINE, ONHOLD en OFFLINE kunnen worden aangevraagd; STARTUP en SHUTDOWN zijn overgangstoestanden. Bronnen: [SWS_TCPIP_00075], [SWS_TCPIP_00085], [SWS_TCPIP_00076], [SWS_TCPIP_00086], [SWS_TCPIP_00077], [SWS_TCPIP_00087], [SWS_TCPIP_00088], SWS TcpIp p. 60 (diagram uit R25-11, overgangen gedekt door de R20-11-requirements)

In STARTUP breekt een OFFLINE-verzoek lopende toewijzingen af [SWS_TCPIP_00088]. Vraagt iemand STARTUP of SHUTDOWN aan, dan wordt dit afgewezen met E_NOT_OK [SWS_TCPIP_00089].

Een typische opstart verloopt als volgt: De EthSM vraagt op verzoek van de ComM ONLINE aan SWS EthSM p. 42. TcpIp meldt daarna het toegewezen adres. Daarop vraagt de SoAd sockets aan en bindt deze ([SWS_TCPIP_00229], SWS SoAd p. 20). Het diagram uit R25-11 toont bovendien een terugkoppeling via EthSM_TcpIpModeIndication SWS TcpIp p. 60. Voor R20-11 geldt dit vermoedelijk eveneens. Vraag Q-a5e26ad792c23d58 (open)

Opstarten van een controller tot aan de gebonden socketComMEthSMTcpIpSoAdEthSM_RequestComMode(network,COMM_FULL_COMMUNICATION)TcpIp_RequestComMode(CtrlIdx,TCPIP_STATE_ONLINE)E_OK (Auftrag angenommen)TCPIP_STATE_STARTUP:Adresszuweisungen aktivierenasynchroon, bijv. DHCP of link-localerste Adresse zugewiesen:TCPIP_STATE_ONLINESoAd_LocalIpAddrAssignmentChg(IpAddrId,TCPIP_IPADDR_STATE_ASSIGNED)EthSM_TcpIpModeIndication(CtrlIdx,TCPIP_STATE_ONLINE) (vermutlich)Use Case: SoAd opent een socketverbindingTcpIp_SoAdGetSocket(Domain, Protocol,SocketIdPtr)E_OK, SocketIdTcpIp_Bind(SocketId, LocalAddrId, PortPtr)E_OK

Sequentiediagram: Pas de asynchrone adrestoewijzing maakt de controller ONLINE. Daarna kan de SoAd sockets aanvragen en binden. Bronnen: [SWS_TCPIP_00070], [SWS_TCPIP_00075], [SWS_TCPIP_00085], [SWS_TCPIP_00229], [SWS_TCPIP_00018], [SWS_TCPIP_00015], SWS EthSM p. 42. De terugkoppeling aan de EthSM is vermoedelijk ook in R20-11 aanwezig.

Lokale adressen en hun toewijzing

De basis is een tabel van lokale adressen uit TcpIpLocalAddr, die tijdens runtime aan EthIf-controllers worden toegewezen ([SWS_TCPIP_00099], SWS TcpIp p. 220). Een invoer wordt aangesproken via TcpIp_LocalAddrIdType [SWS_TCPIP_00030]. Per invoer zijn meerdere methoden mogelijk, zoals statisch, DHCP of link-local ([SWS_TCPIP_00065], SWS TcpIp p. 224). Komt er een adres met een hogere prioriteit beschikbaar, dan vervangt dit het eerdere [SWS_TCPIP_00127].

Hoe toewijzing en vrijgave worden geactiveerd, hangt af van de geconfigureerde trigger:

Elke wijziging van een toewijzing meldt <Up_LocalIpAddrAssignmentChg> met een waarde van het type TcpIp_IpAddrStateType ([SWS_TCPIP_00229], [SWS_TCPIP_00082]). Nieuwe IPv4-adressen kondigt TcpIp aan via gratuitous ARP [SWS_TCPIP_00093]. IPv6-adressen controleert het via duplicate address detection [SWS_TCPIP_00159]. Voor het opvragen dienen TcpIp_GetIpAddr, TcpIp_GetPhysAddr en TcpIp_GetCtrlIdx ([SWS_TCPIP_00032], [SWS_TCPIP_00033], [SWS_TCPIP_00141]). Vraagt men een DHCP-optie op die niet is ingesteld, dan levert de leesservice lengte 0 [SWS_TCPIP_00237].

Sockets: aanvragen, binden, verbinden, sluiten

Een socket vraagt men aan met adresfamilie en protocol ([SWS_TCPIP_00018], [SWS_TCPIP_00009], [SWS_TCPIP_00010]). TcpIp_Bind bindt deze aan een lokaal adres en een poort [SWS_TCPIP_00111]. Dit mislukt als poort, protocol en adres al bezet zijn of als het adres niet is toegewezen ([SWS_TCPIP_00146], [SWS_TCPIP_00254]). Met TCPIP_PORT_ANY kiest de stack zelf een poort tussen 49152 en 65535 SWS TcpIp p. 85.

Voor TCP zijn er twee manieren om een verbinding tot stand te brengen:

  • Als client bouwt TcpIp_TcpConnect de verbinding asynchroon op. Zodra deze tot stand is gebracht, roept TcpIp <Up_TcpConnected> aan ([SWS_TCPIP_00112], [SWS_TCPIP_00227]).
  • Als server zet TcpIp_TcpListen de socket in de luistertoestand [SWS_TCPIP_00113]. Voor elke binnenkomende verbinding leidt TcpIp een eigen socket af en meldt deze met <Up_TcpAccepted> [SWS_TCPIP_00226]. Retourneert de hogere laag E_NOT_OK, dan sluit TcpIp de verbinding SWS SoAd p. 81.

Nieuwe TCP-verbindingen accepteert TcpIp alleen in de toestand ONLINE [SWS_TCPIP_00094].

TCP-verbindingsopbouw als client en als serverSoAdTcpIpEthIfaltClient (actief openen)TcpIp_TcpConnect(SocketId, RemoteAddrPtr)E_OK (asynchron)EthIf_ProvideTxBuffer / EthIf_Transmit(SYN)TcpIp_RxIndication(...)(Antwoord van de tegenpartij)SoAd_TcpConnected(SocketId)Server (passief openen)TcpIp_TcpListen(SocketId, MaxChannels)E_OKTcpIp_RxIndication(...)(Verbindungsanfrage)Socket SocketIdConnected ableiten(maximaal MaxChannels parallel)SoAd_TcpAccepted(SocketId,SocketIdConnected, RemoteAddrPtr)E_OK / E_NOT_OK (verbinding sluiten)

Sequentiediagram: De client ontvangt een bevestiging via <Up_TcpConnected>. De server krijgt per verbinding een afgeleide socket, die de hogere laag kan accepteren of weigeren. Bronnen: [SWS_TCPIP_00022], [SWS_TCPIP_00023], [SWS_TCPIP_00226], [SWS_TCPIP_00227], SWS TcpIp p. 129 (het latere diagram bevat tevens LSduR, dat hier vervalt), SWS TcpIp p. 107

TcpIp_Close beëindigt een TCP-verbinding regulier. Met Abort = TRUE breekt het deze direct af via RST. Bij UDP komen de resources onmiddellijk vrij ([SWS_TCPIP_00109], [SWS_TCPIP_00110]). Gebeurtenissen zoals reset, FIN of sluiten meldt <Up_TcpIpEvent> [SWS_TCPIP_00144]. Met TcpIp_ChangeParameter kunnen socketparameters worden gewijzigd, zoals ontvangstvenster, frameprioriteit, Nagle, TCP-optiefilter of UDP-checksum ([SWS_TCPIP_00126], [SWS_TCPIP_00266], [SWS_TCPIP_00279]).

Gegevenspaden: verzenden, ontvangen, adresresolutie

TcpIp_TcpTransmit werkt asynchroon. Is DataPtr ingesteld, dan neemt het de gegevens over uit deze lineaire buffer. Is DataPtr een NULL_PTR, dan haalt het de gegevens op via <Up_CopyTxData>. Met ForceRetrieve = TRUE zijn dat exact AvailableLength bytes, met FALSE eventueel minder ([SWS_TCPIP_00124], [SWS_TCPIP_00125], [SWS_TCPIP_00228]). Bij TCP roept TcpIp <Up_TxConfirmation> pas aan wanneer de tegenpartij heeft bevestigd ([SWS_TCPIP_00225], SWS SoAd p. 86). TcpIp_UdpTransmit verzendt daarentegen synchroon en direct ([SWS_TCPIP_00025], [SWS_TCPIP_00120]).

TCP-verzending met directe of indirecte gegevensbeschikbaarstellingSoAdTcpIpEthIfTcpIp_TcpTransmit(SocketId, DataPtr,AvailableLength, ForceRetrieve)altDataPtr != NULL_PTRGegevens uit lineaire buffer overnemenDataPtr == NULL_PTRlooptot AvailableLength (ForceRetrieve = TRUE) of minder (FALSE)SoAd_CopyTxData(SocketId, BufPtr, BufLength)BUFREQ_OKE_OKTcpIp_MainFunction()EthIf_ProvideTxBuffer(...)EthIf_Transmit(..., TxConfirmation = FALSE)TcpIp_RxIndication(...)(ACK van de tegenpartij)SoAd_TxConfirmation(SocketId, Length)

Sequentiediagram: Gegevens worden direct overgedragen of opgehaald via kopieer-callback. De verzending naar EthIf loopt in de context van de MainFunction, de bevestiging komt pas na de ACK van de tegenpartij. Bronnen: [SWS_TCPIP_00050], [SWS_TCPIP_00123], [SWS_TCPIP_00124], [SWS_TCPIP_00131], SWS TcpIp p. 109

Bij ontvangst wijst de IP-laag elk datagram toe aan een invoer in de lokale adrestabel [SWS_TCPIP_00169]. UDP en TCP selecteren vervolgens de socket via bestemmingspoort en lokaal adres ([SWS_TCPIP_00170], [SWS_TCPIP_00172]). Bij bestaande TCP-verbindingen moeten bovendien bronadres en bronpoort overeenkomen [SWS_TCPIP_00173]. UDP-broadcasts gaan naar alle passende sockets, TCP-segmenten naar broadcast-adressen worden verworpen ([SWS_TCPIP_00171], [SWS_TCPIP_00174]). Gefragmenteerde datagrammen assembleert TcpIp weer en het mag de ontvangst daarvoor ontkoppelen ([SWS_TCPIP_00054], SWS TcpIp p. 131). De gegevens bereiken de hogere laag via <Up_RxIndication>. Heeft deze de TCP-gegevens verwerkt, dan opent TcpIp_TcpReceived het ontvangstvenster weer ([SWS_TCPIP_00223], [SWS_TCPIP_00115]).

Ontvangst van een datagram tot aan de bovenste laagEthIfTcpIpSoAdEthIf_MainFunctionRx()TcpIp_RxIndication(CtrlIdx, FrameType,IsBroadcast, PhysAddrPtr, DataPtr, LenByte)IP: datagram toewijzen aan een TcpIpAddrIdUDP/TCP: socket selecteren via doelpoort en lokaal adresFragmente: Reassemblierung,Empfang ggf. entkoppeltSoAd_RxIndication(SocketId, RemoteAddrPtr,BufPtr, Length)optTCP-SocketTcpIp_TcpReceived(SocketId, Length)Ontvangstvenster vergroten

Sequentiediagram: Een ontvangen frame wordt via het lokale adres en de poort toegewezen aan een socket. Bij TCP geeft de bevestiging van de hogere laag het ontvangstvenster vrij. Bronnen: [SWS_TCPIP_00029], [SWS_TCPIP_00169], [SWS_TCPIP_00170], [SWS_TCPIP_00223], [SWS_TCPIP_00115], SWS TcpIp p. 108

Voor het verzenden heeft TcpIp het MAC-adres van de bestemming nodig en houdt dit bij in een ARP-tabel:

Elke wijziging van de ARP-tabel meldt TcpIp via <Up_PhysAddrTableChg> [SWS_TCPIP_00142]. Is de neighbor cache vol, dan wordt de oudste invoer verdrongen [SWS_TCPIP_00264]. Opvragen is mogelijk via TcpIp_GetRemotePhysAddr en de cache-leesservices ([SWS_TCPIP_00138], [SWS_TCPIP_91002], [SWS_TCPIP_91001]).

adressaufloesung A IPv4-Paket an entfernten Host senden B Link-Layer-Adresse in ARP-Tabelle? A->B C Paket senden B->C ja D Adresresolutie starten (maximaal één ARP-verzoek per doel binnen TcpIpArpRequestTimeout) B->D nein E TcpIpArpPacketQueueEnabled? D->E F Paket einreihen, E_OK E->F TRUE G Sendeauftrag abweisen, E_NOT_OK E->G FALSE H ARP-Antwort empfangen: Tabelle aktualisieren, <Up>_PhysAddrTableChg(valid = TRUE) F->H H->C eingereihtes Paket (Interpretation)

Activiteitendiagram: Ontbreekt bij het verzenden een ARP-invoer, dan wordt het pakket afhankelijk van de configuratie in de wachtrij geplaatst of afgewezen. Nieuwe verzoeken aan dezelfde bestemming worden gedrosseld. Bronnen: [SWS_TCPIP_00191], [SWS_TCPIP_00192], [SWS_TCPIP_00350], [SWS_TCPIP_00142], SWS TcpIp p. 176. Interpretatie: Het in de wachtrij geplaatste pakket wordt verzonden na succesvolle resolutie.

Beveiliging en filtering: TLS, IPsec, IdsM

Voor TCP-verbindingen ondersteunt TcpIp TLS conform IETF RFC 5246. Versies lager dan 1.2 worden afgewezen ([SWS_TCPIP_00300], [SWS_TCPIP_00302]). PSK-identiteiten en de actuele tijd leveren configureerbare callouts ([SWS_TCPIP_91014], [SWS_TCPIP_91012]). De cryptografie verloopt via de CSM ([SWS_TCPIP_00028], SWS TcpIp p. 251).

IPsec wordt ondersteund met IKEv2, IKEv1 niet ([SWS_TCPIP_00352], [SWS_TCPIP_00353]). Elk datagram wordt toegewezen aan een policy en afhankelijk van de policy beschermd, doorgelaten of verworpen ([SWS_TCPIP_00359], [SWS_TCPIP_00360]). Niet-toegestane IPv6-extension-headers leiden tot stilzwijgend verwerpen [SWS_TCPIP_00260]. Is TcpIpEnableSecurityEventReporting ingesteld, dan meldt TcpIp beveiligingsgebeurtenissen aan de IdsM [SWS_TCPIP_00361].

Gedrag in het foutgeval

De ontwikkelfouten, waaronder TCPIP_E_UNINIT, TCPIP_E_PARAM_POINTER, TCPIP_E_INV_ARG en TCPIP_E_ADDRINUSE, zijn gedefinieerd in [SWS_TCPIP_00042]. Gecontroleerd worden onder andere:

Sommige afwijzingen retourneert TcpIp onafhankelijk van de foutdetectie als E_NOT_OK, bijvoorbeeld een reeds bezette poort of een niet-passende adresfamilie ([SWS_TCPIP_00146], [SWS_TCPIP_00205]).

Runtime-fouten meldt TcpIp via Det_ReportRuntimeError:

R20-11 definieert uitsluitend de codes 0x01 tot en met 0x05 [SWS_TCPIP_00255]. De in latere releases toegevoegde codes TCPIP_E_TX_QUEUE_OVERRUN en TCPIP_E_TX_INTERNAL_PROCESSING_FAILED gelden hier niet SWS TcpIp p. 65.

Veel foutsituaties blijven stil, omdat niet-passende pakketten eenvoudigweg worden verworpen. TcpIp_GetAndResetMeasurementData telt dergelijke verworpen pakketten en stelt de tellers terug ([SWS_TCPIP_91006], [SWS_TCPIP_00296]). Kan een MAC-adres niet worden geresolveerd, dan meldt TcpIp TCPIP_E_PHYS_ADDR_MISS [SWS_TCPIP_00066]. Voor bestemmingen buiten het eigen subnet levert TcpIp_GetRemotePhysAddr direct TCPIP_E_NOT_OK [SWS_TCPIP_00139].

Verdere gedetailleerde bewijzen

AI-gegenereerde handleiding op basis van de specificatiefragmenten. Normatief voor R20-11 zijn uitsluitend de gekoppelde requirements; afwijkingen van andere releases zijn benoemd.

TCP/IP Stack (TcpIp)

Provides IPv4/IPv6 networking, TCP/UDP sockets, ARP, ICMP, and DHCP services.

Funktionen — Übersicht

Typen — Übersicht

Funktionen & Typen — Detailansicht

functie TcpIp_Init [SWS_TCPIP_00002] 📄 PDF

void TcpIp_Init (const TcpIp_ConfigType* ConfigPtr);

This service initializes the TCP/ IP Stack. Tcp Ip_ Init may not block the start - up process for an indefinite amount of time. Caveats: The call of this service is mandatory before using the Tcp Ip instance for further processing.

functie TcpIp_TcpConnect [SWS_TCPIP_00022] 📄 PDF

Std_ReturnType TcpIp_TcpConnect (TcpIp_SocketIdType SocketId, const TcpIp_SockAddrType* RemoteAddrPtr);

B y this API service the TCP/ IP stack is requested to establish a TCP connection to the configured peer.

functie TcpIp_TcpListen [SWS_TCPIP_00023] 📄 PDF

Std_ReturnType TcpIp_TcpListen (TcpIp_SocketIdType SocketId, uint16 MaxChannels);

By this API service the TCP/ IP stack is requested to listen on the TCP socket specified by the socket identifier. Available v ia Tcp Ip.h

functie TcpIp_RequestComMode [SWS_TCPIP_00070] 📄 PDF

Std_ReturnType TcpIp_RequestComMode (uint8 CtrlIdx, TcpIp_StateType State);

By this API service the TCP/ IP stack is requested to change the Tcp Ip state of the communication network identified by Eth If controller index.

functie TcpIp_RequestIpAddrAssignment [SWS_TCPIP_00037] 📄 PDF

Std_ReturnType TcpIp_RequestIpAddrAssignment (TcpIp_LocalAddrIdType LocalAddrId, TcpIp_IpAddrAssignmentTypeType, const TcpIp_SockAddrType* LocalIpAddrPtr, uint8 Netmask, const TcpIp_SockAddrType* DefaultRouterPtr);

Service TcpIp_RequestIpAddrAssignment.

functie TcpIp_ReleaseIpAddrAssignment [SWS_TCPIP_00078] 📄 PDF

Std_ReturnType TcpIp_ReleaseIpAddrAssignment (TcpIp_LocalAddrIdType LocalAddrId);

By this API service the local IP address assignment for the IP address specified by Local Addr Id shall be released.

functie TcpIp_IcmpV6Transmit [SWS_TCPIP_00187] 📄 PDF

Std_ReturnType TcpIp_IcmpV6Transmit (TcpIp_LocalAddrIdType LocalIpAddrId, const TcpIp_SockAddrType* RemoteAddrPtr, uint8 HopLimit, uint8Type, uint8 Code, uint16 DataLength, const uint8* DataPtr); ⚠️

By this API service the TCP/ IP stack sends an ICMPv6 message according to the specified parameters.

functie TcpIp_DhcpReadOption [SWS_TCPIP_00040] 📄 PDF

Std_ReturnType TcpIp_DhcpReadOption (TcpIp_LocalAddrIdType LocalIpAddrId, uint8 Option, uint8* DataLength, uint8* DataPtr);

By this API service the TCP/ IP stack retrieves DHCP option data identified by parameter option for already received DHCP options.

functie TcpIp_DhcpV6ReadOption [SWS_TCPIP_00189] 📄 PDF

Std_ReturnType TcpIp_DhcpV6ReadOption (TcpIp_LocalAddrIdType LocalIpAddrId, uint16 Option, uint16* DataLength, uint8* DataPtr);

By this API service the TCP/ IP stack retrieve s DHCPv6 option data identified by parameter option for already received DHCPv6 options.

functie TcpIp_DhcpWriteOption [SWS_TCPIP_00020] 📄 PDF

Std_ReturnType TcpIp_DhcpWriteOption (TcpIp_LocalAddrIdType LocalIpAddrId, uint8 Option, uint8 DataLength, const uint8* DataPtr);

By this API service the TCP/ IP stack writes the DHCP option data identified by parameter option.

functie TcpIp_DhcpV6WriteOption [SWS_TCPIP_00190] 📄 PDF

Std_ReturnType TcpIp_DhcpV6WriteOption (TcpIp_LocalAddrIdType LocalIpAddrId, uint16 Option, uint16 DataLength, const uint8* DataPtr);

By this API service the TCP/ IP stack writes the DHCPv6 option data identified by parameter option.

functie TcpIp_ChangeParameter [SWS_TCPIP_00016] 📄 PDF

Std_ReturnType TcpIp_ChangeParameter (TcpIp_SocketIdType SocketId, TcpIp_ParamIdType ParameterId, const uint8* ParameterValue);

By this API service the TCP/ IP stack is requested to change a parameter of a socket. E.g. the Nagle algorithm may be controlled by this API.

functie TcpIp_GetIpAddr [SWS_TCPIP_00032] 📄 PDF

Std_ReturnType TcpIp_GetIpAddr (TcpIp_LocalAddrIdType LocalAddrId, TcpIp_SockAddrType* IpAddrPtr, uint8* NetmaskPtr, TcpIp_SockAddrType* DefaultRouterPtr);

Service TcpIp_GetIpAddr.

functie TcpIp_GetPhysAddr [SWS_TCPIP_00033] 📄 PDF

Std_ReturnType TcpIp_GetPhysAddr (TcpIp_LocalAddrIdType LocalAddrId, uint8* PhysAddrPtr);

Obtains the physical source address used by the Eth If controller implicitly specif ied via Local Addr Id.

functie TcpIp_GetRemotePhysAddr [SWS_TCPIP_00137] 📄 PDF

TcpIp_ReturnType TcpIp_GetRemotePhysAddr (uint8 CtrlIdx, const TcpIp_SockAddrType* IpAddrPtr, uint8* PhysAddrPtr, boolean InitRes);

Tcp Ip_ Get Remote Phys Addr queries the IP/ physical address translation table specified by Ctrl Idx and returns the physical address related to the IP addres s specified by Ip Addr Ptr. In case no physical address can be retrieved and parameter init Res is TRUE, address resolution for the specified IP address is initiated on the local network.

functie TcpIp_GetCtrlIdx [SWS_TCPIP_00140] 📄 PDF

Std_ReturnType TcpIp_GetCtrlIdx (TcpIp_LocalAddrIdType LocalAddrId, uint8* CtrlIdxPtr);

Tcp Ip_ Get Ctrl Idx returns the index of the controller related to Local Addr Id.

functie TcpIp_GetArpCacheEntries [SWS_TCPIP_91002] 📄 PDF

Std_ReturnType TcpIp_GetArpCacheEntries (AUTO SAR CP R20 - of uint8 ctrlIdx, uint32* numberOfElements, TcpIp_ArpCacheEntryType* entryListPtr); ⚠️

Copies entries from the physic al address cache of the IPv4 instance that is active on the Eth If controller specified by ctrl Idx into a user provided buffer. The function will copy all or number Of

functie TcpIp_GetNdpCacheEntries [SWS_TCPIP_91001] 📄 PDF

Std_ReturnType TcpIp_GetNdpCacheEntries (uint8 ctrlIdx, uint32* numberOfElements, TcpIp_NdpCacheEntryType* entryListPtr);

Copies entries from the physic al address cache of the IPv6 instance that is active on the Eth If controller specified by ctrl Idx into a user provided buffer. The function will copy all or number Of

functie TcpIp_GetAndResetMeasurementData [SWS_TCPIP_91006] 📄 PDF

Std_ReturnType TcpIp_GetAndResetMeasurementData (TcpIp_MeasurementIdxType MeasurementIdx, boolean MeasurementResetNeeded, uint32* MeasurementDataPtr);

Allows to read and reset detailed measurement data for diagnostic purposes. Get all Measurement Idx's at once is not supported. TCPIP_ MEAS_ ALL shall only be used to reset all Measurement Idx's at once. A NULL_ PTR shall be provided for Measurement Data Ptr in this case.

functie TcpIp_UdpTransmit [SWS_TCPIP_00025] 📄 PDF

Std_ReturnType TcpIp_UdpTransmit (TcpIp_SocketIdType SocketId, const uint8* DataPtr, const TcpIp_SockAddrType* RemoteAddrPtr, uint16 TotalLength);

This service transmits data via UDP to a remote node. The transmission of the data is immediately performed with this function call by forwarding it to Eth If.

functie TcpIp_MainFunction [SWS_TCPIP_00026] 📄 PDF

void TcpIp_MainFunction (void);

Schedules the TCP/ IP stack. (Entry point for scheduling) AUTO SAR CP R20 - of Document ID : AUTOSAR_SWS_TcpIp

functie <Up_PhysAddrTableChg> [SWS_TCPIP_00143] 📄 PDF

void <Up_PhysAddrTableChg> (uint8 CtrlIdx, const TcpIp_SockAddrType* IpAddrPtr, const uint8* PhysAddrPtr, boolean valid);

This API is called by Tcp Ip in case of a change in the ARP/ NDP table related to the controller specified by Ctrl Idx.

functie <Up_RxIndication> [SWS_TCPIP_00223] 📄 PDF

void <Up_RxIndication> (TcpIp_SocketIdType SocketId, const TcpIp_SockAddrType* RemoteAddrPtr, const uint8* BufPtr, uint16 Length);

The TCP/ IP stack calls this primitive after the reception of data on a socket. The socket identifier along with configuration information determines which module is to be called.

functie <Up_TxConfirmation> [SWS_TCPIP_00225] 📄 PDF

void <Up_TxConfirmation> (TcpIp_SocketIdType SocketId, uint16 Length);

The TCP/ IP stack calls this function after the data has been acknowledged by the peer for TCP. Caveats: The upper layer might not be able to determine exactly which data bytes have been confirmed.

functie <Up_TcpAccepted> [SWS_TCPIP_00226] 📄 PDF

Std_ReturnType <Up_TcpAccepted> (TcpIp_SocketIdType SocketId, TcpIp_SocketIdType SocketIdConnected, const TcpIp_SockAddrType* RemoteAddrPtr);

This service gets called if the stack put a socket into the listen mode before (as server) and a peer connected to it (as client). In detail: T he TCP/ IP stack calls this function after a socket was set into the listen state with Tcp Ip_ Tcp Listen() and a TCP connection is requested by the peer.

functie <Up_TcpConnected> [SWS_TCPIP_00227] 📄 PDF

void <Up_TcpConnected> (TcpIp_SocketIdType SocketId);

This service gets called if the stack initiated a TCP connection before (as client) and the peer (the server) acknowledged the connection set up. In detail: The TCP/ IP stack calls this function after a socket was requested to connect with Tcp Ip_ Tcp Conn ect() and a TCP connection is confirmed by the peer. The parameter value of Socket Id equals the Socket Id value of the preceeding Tcp Ip_ Tcp Connect() call.

functie <Up_CopyTxData> [SWS_TCPIP_00228] 📄 PDF

BufReq_ReturnType <Up_CopyTxData> (TcpIp_SocketIdType SocketId, uint8* BufPtr, uint16 BufLength);

This service requests to copy data for transmission to the buffer indicated. This call is triggered by Tcp Ip_ Transmit(). Note: The call to _ Copy Tx Data() may happen in the context of Tcp Ip_ Transmit().

functie <Up_LocalIpAddrAssignmentChg> [SWS_TCPIP_00229] 📄 PDF

void <Up_LocalIpAddrAssignmentChg> (TcpIp_LocalAddrIdType IpAddrId, TcpIp_IpAddrStateType State);

This service gets called by the TCP/ IP stack if an IP address assignment changes (i.e. new address assigned or assigned address becomes invalid).

functie <Up_IcmpMsgHandler> [SWS_TCPIP_00270] 📄 PDF

void <Up_IcmpMsgHandler> (TcpIp_LocalAddrIdType LocalAddrId, const TcpIp_SockAddrType* RemoteAddrPtr, uint8 Ttl, uint8Type, uint8 Code, uint16 DataLength, uint8* DataPtr); ⚠️

By this API service the configured ICMP message handler function is called by the TCP/ IP stack on reception of a ICMP message which is not handled by the TCP/ IP stack.

functie <Up_DADAddressConflict> [SWS_TCPIP_91005] 📄 PDF

void <Up_DADAddressConflict> (TcpIp_LocalAddrIdType IpAddrId, const TcpIp_SockAddrType* IpAddrPtr, const uint8* LocalPhysAddrPtr, const uint8* RemotePhysAddrPtr);

This API is called by Tcp Ip in case the Duplicate Address Detection (DAD) is enabled and detecting a duplicate IP Address.

functie <Up_TlsGetCurrentTime> [SWS_TCPIP_91012] 📄 PDF

Std_ReturnType <Up_TlsGetCurrentTime> (uint32* CurrentTimeUtc);

This function queries the current time. This information will be requested when assembling the client hello message.

functie <Up_TlsServerGetPskIdentityHint> [SWS_TCPIP_91013] 📄 PDF

Std_ReturnType <Up_TlsServerGetPskIdentityHint> (TcpIp_SocketIdType SocketId, TcpIp_TlsConnectionIdType TlsConnectionId, uint16* IdentityHintLengthPtr, uint8* IdentityHintPtr);

Queries the Identity hint for a pr e - shared key ciphersuite. This information is transmitted by the TLS Server to provide its identification to the TLS client.

functie <Up_TlsServerGetPskIdentity> [SWS_TCPIP_91015] 📄 PDF

Std_ReturnType <Up_TlsServerGetPskIdentity> (TcpIp_SocketIdType SocketId, TcpIp_TlsConnectionIdType TlsConnectionId, uint16 PskKeyIdentityLength, const uint8* PskKeyIdentityPtr, uint32* CsmKeyId);

This callback is used for the TLS server to provide the CSM key name according to the key identification that was selected by the TLS client. The TLS server must provide a Csm Key reference to a key that matches this key identification name.

type TcpIp_SockAddrType [SWS_TCPIP_00012] 📄 PDF

Generic structure used by APIs to specify an IP address. (A specific address type can be derived from this structure via a cast to the specific struct type.)

type TcpIp_SockAddrInetType [SWS_TCPIP_00013] 📄 PDF

This structure defines an IPv4 address type which can be derived from the generic address structure via cast.

type TcpIp_SockAddrInet6Type [SWS_TCPIP_00014] 📄 PDF

This structure defines a IPv6 address type which can be derived from the generic address structure via cast. AUTO SAR CP R20 - of Document ID : AUTOSAR_SWS_TcpIp

type TcpIp_LocalAddrIdType [SWS_TCPIP_00030] 📄 PDF

Address identification type for unique identification of a local IP address and Eth If Controller configured in the Tcp Ip module.

type TcpIp_SocketIdType [SWS_TCPIP_00038] 📄 PDF

Socket identifier type for unique identification of a Tcp Ip stack socket. TCPIP_ SOCKETID_ INVALID shall specify an invalid socket handle.

type TcpIp_TlsConnectionIdType [SWS_TCPIP_91011] 📄 PDF

TLS connection identifier type for unique identification of a TLS connection. TCPIP_ TLSCONNECTIONID_ INVALID shall specify an invalid TLS connection handle.

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/CP_MOD_TcpIp
Status
unspecified
Version
AUTOSAR/AP/record/CP_MOD_TcpIp@rel:R20-11#18bc4615
Content hash
18bc4615
Source
https://www.autosar.org/fileadmin/standards/R20-11/CP/AUTOSAR_SWS_TcpIp.pdf#nameddest=SWS_TCPIP_00002

Themakaart

Detailweergave

Kies een item in de inhoudsopgave.

Initialisatie en status

Returns the version information.

void TcpIp_GetVersionInfo (Std_VersionInfoType* versioninfo);
TcpIp_Init functie

This service initializes the TCP/ IP Stack. Tcp Ip_ Init may not block the start - up process for an indefinite amount of time. Caveats: The call of this service is mandatory before using the Tcp Ip instance for further processing.

void TcpIp_Init (const TcpIp_ConfigType* ConfigPtr);

Diensten · Get…

Allows to read and reset detailed measurement data for diagnostic purposes. Get all Measurement Idx's at once is not supported. TCPIP_ MEAS_ ALL shall only be used to reset all Measurement Idx's at once. A NULL_ PTR shall be provided for Measurement Data Ptr in this case.

Std_ReturnType TcpIp_GetAndResetMeasurementData (TcpIp_MeasurementIdxType MeasurementIdx, boolean MeasurementResetNeeded, uint32* MeasurementDataPtr);

Copies entries from the physic al address cache of the IPv4 instance that is active on the Eth If controller specified by ctrl Idx into a user provided buffer. The function will copy all or number Of

Std_ReturnType TcpIp_GetArpCacheEntries (AUTO SAR CP R20 - of uint8 ctrlIdx, uint32* numberOfElements, TcpIp_ArpCacheEntryType* entryListPtr); ⚠️

Tcp Ip_ Get Ctrl Idx returns the index of the controller related to Local Addr Id.

Std_ReturnType TcpIp_GetCtrlIdx (TcpIp_LocalAddrIdType LocalAddrId, uint8* CtrlIdxPtr);

Service TcpIp_GetIpAddr.

Std_ReturnType TcpIp_GetIpAddr (TcpIp_LocalAddrIdType LocalAddrId, TcpIp_SockAddrType* IpAddrPtr, uint8* NetmaskPtr, TcpIp_SockAddrType* DefaultRouterPtr);

Copies entries from the physic al address cache of the IPv6 instance that is active on the Eth If controller specified by ctrl Idx into a user provided buffer. The function will copy all or number Of

Std_ReturnType TcpIp_GetNdpCacheEntries (uint8 ctrlIdx, uint32* numberOfElements, TcpIp_NdpCacheEntryType* entryListPtr);

Obtains the physical source address used by the Eth If controller implicitly specif ied via Local Addr Id.

Std_ReturnType TcpIp_GetPhysAddr (TcpIp_LocalAddrIdType LocalAddrId, uint8* PhysAddrPtr);

Tcp Ip_ Get Remote Phys Addr queries the IP/ physical address translation table specified by Ctrl Idx and returns the physical address related to the IP addres s specified by Ip Addr Ptr. In case no physical address can be retrieved and parameter init Res is TRUE, address resolution for the specified IP address is initiated on the local network.

TcpIp_ReturnType TcpIp_GetRemotePhysAddr (uint8 CtrlIdx, const TcpIp_SockAddrType* IpAddrPtr, uint8* PhysAddrPtr, boolean InitRes);

Diensten · Dhcp…

By this API service the TCP/ IP stack retrieves DHCP option data identified by parameter option for already received DHCP options.

Std_ReturnType TcpIp_DhcpReadOption (TcpIp_LocalAddrIdType LocalIpAddrId, uint8 Option, uint8* DataLength, uint8* DataPtr);

By this API service the TCP/ IP stack retrieve s DHCPv6 option data identified by parameter option for already received DHCPv6 options.

Std_ReturnType TcpIp_DhcpV6ReadOption (TcpIp_LocalAddrIdType LocalIpAddrId, uint16 Option, uint16* DataLength, uint8* DataPtr);

By this API service the TCP/ IP stack writes the DHCPv6 option data identified by parameter option.

Std_ReturnType TcpIp_DhcpV6WriteOption (TcpIp_LocalAddrIdType LocalIpAddrId, uint16 Option, uint16 DataLength, const uint8* DataPtr);

By this API service the TCP/ IP stack writes the DHCP option data identified by parameter option.

Std_ReturnType TcpIp_DhcpWriteOption (TcpIp_LocalAddrIdType LocalIpAddrId, uint8 Option, uint8 DataLength, const uint8* DataPtr);

Diensten · Tcp…

B y this API service the TCP/ IP stack is requested to establish a TCP connection to the configured peer.

Std_ReturnType TcpIp_TcpConnect (TcpIp_SocketIdType SocketId, const TcpIp_SockAddrType* RemoteAddrPtr);

By this API service the TCP/ IP stack is requested to listen on the TCP socket specified by the socket identifier. Available v ia Tcp Ip.h

Std_ReturnType TcpIp_TcpListen (TcpIp_SocketIdType SocketId, uint16 MaxChannels);

By this API service the reception of socket data is confirmed to the TCP/ IP stack.

Std_ReturnType TcpIp_TcpReceived (TcpIp_SocketIdType SocketId, uint32 Length);

Service TcpIp_TcpTransmit.

Std_ReturnType TcpIp_TcpTransmit (TcpIp_SocketIdType SocketId, const uint8* DataPtr, uint32 AvailableLength, boolean ForceRetrieve);

Diensten · Overige

TcpIp_Bind functie

Service TcpIp_Bind.

Std_ReturnType TcpIp_Bind (TcpIp_SocketIdType SocketId, TcpIp_LocalAddrIdType LocalAddrId, uint16* PortPtr);

By this API service the TCP/ IP stack is requested to change a parameter of a socket. E.g. the Nagle algorithm may be controlled by this API.

Std_ReturnType TcpIp_ChangeParameter (TcpIp_SocketIdType SocketId, TcpIp_ParamIdType ParameterId, const uint8* ParameterValue);
TcpIp_Close functie

By this API service the TCP/ IP stack is requested to close the socket and release all related resources.

Std_ReturnType TcpIp_Close (TcpIp_SocketIdType SocketId, boolean Abort);

Service TcpIp_IcmpTransmit.

Std_ReturnType TcpIp_IcmpTransmit (TcpIp_LocalAddrIdType LocalIpAddrId, AUTO SAR CP R20 - of const TcpIp_SockAddrType* RemoteAddrPtr, uint8 Ttl, uint8Type, uint8 Code, uint16 DataLength, const uint8* DataPtr); ⚠️

By this API service the TCP/ IP stack sends an ICMPv6 message according to the specified parameters.

Std_ReturnType TcpIp_IcmpV6Transmit (TcpIp_LocalAddrIdType LocalIpAddrId, const TcpIp_SockAddrType* RemoteAddrPtr, uint8 HopLimit, uint8Type, uint8 Code, uint16 DataLength, const uint8* DataPtr); ⚠️

By this API service the local IP address assignment for the IP address specified by Local Addr Id shall be released.

Std_ReturnType TcpIp_ReleaseIpAddrAssignment (TcpIp_LocalAddrIdType LocalAddrId);

By this API service the TCP/ IP stack is requested to change the Tcp Ip state of the communication network identified by Eth If controller index.

Std_ReturnType TcpIp_RequestComMode (uint8 CtrlIdx, TcpIp_StateType State);

Service TcpIp_RequestIpAddrAssignment.

Std_ReturnType TcpIp_RequestIpAddrAssignment (TcpIp_LocalAddrIdType LocalAddrId, TcpIp_IpAddrAssignmentTypeType, const TcpIp_SockAddrType* LocalIpAddrPtr, uint8 Netmask, const TcpIp_SockAddrType* DefaultRouterPtr);

Resets all learned IP - addresses to invalid values.

Std_ReturnType TcpIp_ResetIpAssignment (void);

This service transmits data via UDP to a remote node. The transmission of the data is immediately performed with this function call by forwarding it to Eth If.

Std_ReturnType TcpIp_UdpTransmit (TcpIp_SocketIdType SocketId, const uint8* DataPtr, const TcpIp_SockAddrType* RemoteAddrPtr, uint16 TotalLength);

Callbacks

By this API service the TCP/ IP stack gets an indication and the data of a received frame.

void TcpIp_RxIndication (uint8 CtrlIdx, Eth_FrameType FrameType, boolean IsBroadcast, const uint8* PhysAddrPtr, const uint8* DataPtr, uint16 LenByte);

Callouts en verwachte interfaces

This service requests to copy data for transmission to the buffer indicated. This call is triggered by Tcp Ip_ Transmit(). Note: The call to _ Copy Tx Data() may happen in the context of Tcp Ip_ Transmit().

BufReq_ReturnType <Up_CopyTxData> (TcpIp_SocketIdType SocketId, uint8* BufPtr, uint16 BufLength);

This API is called by Tcp Ip in case the Duplicate Address Detection (DAD) is enabled and detecting a duplicate IP Address.

void <Up_DADAddressConflict> (TcpIp_LocalAddrIdType IpAddrId, const TcpIp_SockAddrType* IpAddrPtr, const uint8* LocalPhysAddrPtr, const uint8* RemotePhysAddrPtr);

By this API service the configured ICMP message handler function is called by the TCP/ IP stack on reception of a ICMP message which is not handled by the TCP/ IP stack.

void <Up_IcmpMsgHandler> (TcpIp_LocalAddrIdType LocalAddrId, const TcpIp_SockAddrType* RemoteAddrPtr, uint8 Ttl, uint8Type, uint8 Code, uint16 DataLength, uint8* DataPtr); ⚠️

This service gets called by the TCP/ IP stack if an IP address assignment changes (i.e. new address assigned or assigned address becomes invalid).

void <Up_LocalIpAddrAssignmentChg> (TcpIp_LocalAddrIdType IpAddrId, TcpIp_IpAddrStateType State);

This API is called by Tcp Ip in case of a change in the ARP/ NDP table related to the controller specified by Ctrl Idx.

void <Up_PhysAddrTableChg> (uint8 CtrlIdx, const TcpIp_SockAddrType* IpAddrPtr, const uint8* PhysAddrPtr, boolean valid);

The TCP/ IP stack calls this primitive after the reception of data on a socket. The socket identifier along with configuration information determines which module is to be called.

void <Up_RxIndication> (TcpIp_SocketIdType SocketId, const TcpIp_SockAddrType* RemoteAddrPtr, const uint8* BufPtr, uint16 Length);

This service gets called if the stack put a socket into the listen mode before (as server) and a peer connected to it (as client). In detail: T he TCP/ IP stack calls this function after a socket was set into the listen state with Tcp Ip_ Tcp Listen() and a TCP connection is requested by the peer.

Std_ReturnType <Up_TcpAccepted> (TcpIp_SocketIdType SocketId, TcpIp_SocketIdType SocketIdConnected, const TcpIp_SockAddrType* RemoteAddrPtr);

This service gets called if the stack initiated a TCP connection before (as client) and the peer (the server) acknowledged the connection set up. In detail: The TCP/ IP stack calls this function after a socket was requested to connect with Tcp Ip_ Tcp Conn ect() and a TCP connection is confirmed by the peer. The parameter value of Socket Id equals the Socket Id value of the preceeding Tcp Ip_ Tcp Connect() call.

void <Up_TcpConnected> (TcpIp_SocketIdType SocketId);

Service .

Std_ReturnType <Up_TlsClientGetPskIdentity> (TcpIp_SocketIdType SocketId, TcpIp_TlsConnectionIdType TlsConnectionId, uint16 PskIdentityHintLength, const uint8* PskIdentityHintPtr, uint16* PskKeyIdentityLengthPtr, uint8* PskKeyIdentityPtr, uint32* CsmKeyId);

This function queries the current time. This information will be requested when assembling the client hello message.

Std_ReturnType <Up_TlsGetCurrentTime> (uint32* CurrentTimeUtc);

This callback is used for the TLS server to provide the CSM key name according to the key identification that was selected by the TLS client. The TLS server must provide a Csm Key reference to a key that matches this key identification name.

Std_ReturnType <Up_TlsServerGetPskIdentity> (TcpIp_SocketIdType SocketId, TcpIp_TlsConnectionIdType TlsConnectionId, uint16 PskKeyIdentityLength, const uint8* PskKeyIdentityPtr, uint32* CsmKeyId);

Queries the Identity hint for a pr e - shared key ciphersuite. This information is transmitted by the TLS Server to provide its identification to the TLS client.

Std_ReturnType <Up_TlsServerGetPskIdentityHint> (TcpIp_SocketIdType SocketId, TcpIp_TlsConnectionIdType TlsConnectionId, uint16* IdentityHintLengthPtr, uint8* IdentityHintPtr);

The TCP/ IP stack calls this function after the data has been acknowledged by the peer for TCP. Caveats: The upper layer might not be able to determine exactly which data bytes have been confirmed.

void <Up_TxConfirmation> (TcpIp_SocketIdType SocketId, uint16 Length);

Cyclisch

Schedules the TCP/ IP stack. (Entry point for scheduling) AUTO SAR CP R20 - of Document ID : AUTOSAR_SWS_TcpIp

void TcpIp_MainFunction (void);

Typen

Tcp Ip_ Arp Cache Entries elements type

Configuration data structure of the Tcp Ip module.

Tcp Ip address families.

Events reported by Tcp Ip.

IPv6 address assignment policy.

Specifies the state of local IP a ddress assignment

Address identification type for unique identification of a local IP address and Eth If Controller configured in the Tcp Ip module.

Index to select specific measurement data

Tcp Ip_ Ndp Cache Entries elements type

Type TcpIp_ParamIdType.

Protocol type used by a socket.

Tcp Ip specific return type.

This structure defines a IPv6 address type which can be derived from the generic address structure via cast. AUTO SAR CP R20 - of Document ID : AUTOSAR_SWS_TcpIp

This structure defines an IPv4 address type which can be derived from the generic address structure via cast.

Generic structure used by APIs to specify an IP address. (A specific address type can be derived from this structure via a cast to the specific struct type.)

Socket identifier type for unique identification of a Tcp Ip stack socket. TCPIP_ SOCKETID_ INVALID shall specify an invalid socket handle.

Specifies the Tcp Ip state for a specific Eth If controller.

TLS connection identifier type for unique identification of a TLS connection. TCPIP_ TLSCONNECTIONID_ INVALID shall specify an invalid TLS connection handle.

IP6 address wildcard.

IP address wildcard.

Local Addr Id wildcard.

Port wildcard.