Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 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.

Similar presentations


Presentation on theme: "1 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."— Presentation transcript:

1 1 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

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

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

4 4 draft-hiko-pana-api-02.txt API List (1/2) 37 functions are defined. Initialization and Configuration (3) –PANAOpen() –PANAClose() –PANAGetDefaultConfigFile Name() Callback registration (4) –PANARegisterMessage Callback() –PANADeregisterMessage Callback() –PANARegisterTimer Callback() –PANADeregisterTimer Callback() Session management (8) –PANANewSession() –PANAFreeSession() –PANARegisterSession() –PANASetSessionAttribute() –PANAGetSessionAttribute() –PANASessionValidityCheck() –PANADeriveAuthKey() –PANADeriveMasterKey()

5 5 draft-hiko-pana-api-02.txt API List (2/2) PANA operation (9) –PANAClientInitiation() –PANAStart() –PANAAuth() –PANABind() –PANAPing() –PANATerimnation() –PANAError() –PANAReauth() –PANAUpdate() EP control (2) –PANASetEP() –PANASetMasterKey() Dictionary lookup (6) –PANADictionaryEntryFrom AVPCode() –PANADictionaryEntryFrom Name() –PANAValueFromName() –PANAValueFromAVPCode() –PANALookupValueName UsingValue() –PANAGetMessageCode() Message management (5) –PANACreateAVP() –PANAFreeAVP() –PANACreateAndAddAVPTo List() –PANARemoveAVPFromList() –PANAComputeAuthAVP()

6 6 draft-hiko-pana-api-02.txt 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 7 draft-hiko-pana-api-02.txt 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 8 draft-hiko-pana-api-02.txt Example Implementation (PaC) ・・ ・ PaCPAADiameter server PCI PSR PSA PAR PAN Diameter-EAP Request Diameter-EAP Answer Diameter-EAP Request Diameter-EAP Answer PBR PBA

9 9 draft-hiko-pana-api-02.txt 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); ・ } Register callback function Create message and send it to PAA

10 10 draft-hiko-pana-api-02.txt Example Implementation (PAA to AAAc) ・・ ・ PaCPAA / Diameter clientDiameter server PCI PSR PSA PAR PAN Diameter-EAP Request Diameter-EAP Answer Diameter-EAP Request Diameter-EAP Answer PBR PBA

11 11 draft-hiko-pana-api-02.txt 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); ・ } Register callback function Create message and send it to Diameter

12 12 draft-hiko-pana-api-02.txt Example Implementation (AAAc to PAA) ・・ ・ PaCPAADiameter server PCI PSR PSA PAR PAN Diameter-EAP Request Diameter-EAP Answer Diameter-EAP Request Diameter-EAP Answer PBR PBA

13 13 draft-hiko-pana-api-02.txt 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 14 draft-hiko-pana-api-02.txt 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?


Download ppt "1 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."

Similar presentations


Ads by Google