1 / 14

The PANA API draft-hiko-pana-api-02.txt

The PANA API draft-hiko-pana-api-02.txt. Yoshihiko Kainuma Fumio Teraoka Graduate School of Science and Technology Keio University. Assumed Usage of PANA Library. (out of scope of this i-d). PaC main part. PAA / AAAc main part. AAArelay main part. pana. diameter. pana lib. pana lib.

urian
Télécharger la présentation

The PANA API draft-hiko-pana-api-02.txt

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The PANA APIdraft-hiko-pana-api-02.txt Yoshihiko Kainuma Fumio Teraoka Graduate School of Science and Technology Keio University

  2. Assumed Usage of PANA Library (out of scope of this i-d) PaC main part PAA / AAAc main part AAArelay main part pana diameter pana lib pana lib diameterlib diameterlib AAA relay process PaC process on mobile node PAA / AAAc process on server or router diameter snmp router/bridge AAAh main part EP diameterlib AAA home process

  3. PANA API Overview • Based on draft-ietf-pana-pana-12.txt • Multi-Thread Main thread Listener thread Message callback thread listen to messages from peer. execute message callbacks. Session thread Timeout callback thread manage timers. execute timer callbacks. Retransmission thread retransmit messages.

  4. 37 functions are defined. Initialization and Configuration (3) PANAOpen() PANAClose() PANAGetDefaultConfigFileName() Callback registration (4) PANARegisterMessageCallback() PANADeregisterMessageCallback() PANARegisterTimerCallback() PANADeregisterTimerCallback() Session management (8) PANANewSession() PANAFreeSession() PANARegisterSession() PANASetSessionAttribute() PANAGetSessionAttribute() PANASessionValidityCheck() PANADeriveAuthKey() PANADeriveMasterKey() API List (1/2)

  5. PANA operation (9) PANAClientInitiation() PANAStart() PANAAuth() PANABind() PANAPing() PANATerimnation() PANAError() PANAReauth() PANAUpdate() EP control (2) PANASetEP() PANASetMasterKey() Dictionary lookup (6) PANADictionaryEntryFromAVPCode() PANADictionaryEntryFromName() PANAValueFromName() PANAValueFromAVPCode() PANALookupValueNameUsingValue() PANAGetMessageCode() Message management (5) PANACreateAVP() PANAFreeAVP() PANACreateAndAddAVPToList() PANARemoveAVPFromList() PANAComputeAuthAVP() API List (2/2)

  6. Callback Registration • PANARegisterMessageCallback (PANAMessageCode code, PANAMessageFlag flg, PANAVendorID vid, char *messageName, PANACallback *callback, PANACallbackPosition *position) important parameters • code: Code of the message (e.g. PANA-Start: 2). • flg: Flag of the message (e.g. REQUEST: 0x8000). • callback: Callback to be registered.

  7. Message Creation and Transmission • PANAAuth (PANASessionID *id, PANAMessageFlag flg, PANA_AVP_LIST *avp_list) important parameters • id: Identifier of the session to be handled. • flg: Flag of the message (e.g. REQUEST: 0x8000). • avp_list: AVP list to be attached to the message. *other PANA functions have the similar syntax.

  8. Example Implementation (PaC) PaC PAA Diameter server PCI PSR PSA PAR PAN Diameter-EAP Request Diameter-EAP Answer ・・・ Diameter-EAP Request Diameter-EAP Answer PBR PBA

  9. Example Implementation (PaC) PANAReturnCode HandleStartRequest(void *ptr) { PANAMessage *msg = (PANAMessage *)ptr; PANA_AVP_LIST *avpList; ・ ・ ・ PANAReturnCode res = PANAStart(msg->sender, 0, avpList); return res; } int main() { ・ ・ ・ PANARegisterMessageCallback(PANA_START, REQUEST, 0, NULL, HandleStartRequest, PANA_APP_INSTALL_ANYWHERE); ・ ・ ・ } Create message and send it to PAA Register callback function

  10. Example Implementation (PAA to AAAc) PaC PAA / Diameter client Diameter server PCI PSR PSA PAR PAN Diameter-EAP Request Diameter-EAP Answer ・・・ Diameter-EAP Request Diameter-EAP Answer PBR PBA

  11. Example Implementation (PAA to AAAc) PANAReturnCode HandleAuthAnswer(void *ptr) { PANAMessage *msg_pana = (PANAMessage *)ptr; AAAMessage *msg_aaa; PANA_AVP_LIST *avpList; ・ ・ ・ AAAReturnCode res = AAASendMessage(msg_aaa); return res; } int main() { ・ ・ ・ PANARegisterMessageCallback(PANA_AUTH, REQUEST, 0, NULL, HandleAuthAnswer, PANA_APP_INSTALL_ANYWHERE); ・ ・ ・ } Create message and send it to Diameter Register callback function

  12. Example Implementation (AAAc to PAA) PaC PAA Diameter server PCI PSR PSA PAR PAN Diameter-EAP Request Diameter-EAP Answer ・・・ Diameter-EAP Request Diameter-EAP Answer PBR PBA

  13. Example Implementation (AAAc to PAA) PANAReturnCode HandleEAPAnswer(void *ptr) { AAAMessage *msg_aaa = (AAAMessage *)ptr; PANAMessage *msg_pana; PANASessionID *id PANA_AVP_LIST *avpList; ・ ・ ・ PANAReturnCode res = PANABind(id, REQUEST, avpList); return res; } int main() { ・ ・ ・ AAARegisterCommandCallback(EAP_APPLICATION, AAA_NO_VENDOR_ID, NULL, 0, HandleEAPAnswer, AAA_APP_INSTALL_FIRST); ・ ・ ・ } Create message and send it to PaC Registering callback function

  14. Current Status • PANA API implementation • based on draft-ietf-pana-pana-12.txt • developed on FreeBSD • running on *BSD and Linux • will be released with BSD license. • Diameter API implementation • based on draft-ietf-dime-diameter-api-00.txt (expired) • developed on FreeBSD • running on *BSD and Linux • will be released with BSD license. • Adapt this draft as WG document?

More Related