Lines Matching full:pd

105 #define SCS_11                  0x11    /* CP -> PD -- CMD_CHLNG */
106 #define SCS_12 0x12 /* PD -> CP -- REPLY_CCRYPT */
107 #define SCS_13 0x13 /* CP -> PD -- CMD_SCRYPT */
108 #define SCS_14 0x14 /* PD -> CP -- REPLY_RMAC_I */
110 #define SCS_15 0x15 /* CP -> PD -- packets w MAC w/o ENC */
111 #define SCS_16 0x16 /* PD -> CP -- packets w MAC w/o ENC */
112 #define SCS_17 0x17 /* CP -> PD -- packets w MAC w ENC*/
113 #define SCS_18 0x18 /* PD -> CP -- packets w MAC w ENC*/
115 /* PD Flags */
116 #define PD_FLAG_SC_CAPABLE 0x00000001 /* PD secure channel capable */
127 #define PD_FLAG_HAS_SCBK 0x00001000 /* PD has a dedicated SCBK */
128 #define PD_FLAG_INSTALL_MODE 0x40000000 /* PD is in install mode */
129 #define PD_FLAG_PD_MODE 0x80000000 /* device is setup as PD */
145 * @brief Unknown Command Code – Command not implemented by PD
217 * without altering the state of this PD.
232 * this packet; pd->reply_id is set REPLY_NAK and the reason code is
239 * @brief Various PD capability function codes.
249 * switch using a two-wire electrical connection between the PD and the
253 * The PD may simply resolve all circuit states to an open/closed
263 * Control Panel (CP) can directly set the Output's state, or, if the PD
287 * @brief This capability indicates that the PD supports a text display
294 * awareness or time keeping ability of the PD.
300 * capability indicates if the PD is capable of supporting CRC mode.
305 * @brief This capability indicates the extent to which the PD supports
312 * PD can receive.
318 * which the PD can handle.
323 * @brief This capability indicates whether the PD supports the
355 * @brief PD capability structure. Each PD capability has a 3 byte
360 * the PD can do with this capability.
361 * @param num_items Number of such capability entities in PD.
370 * @brief PD ID information advertised by the PD.
375 * @param serial_number 4-byte serial number for the PD
456 /* PD state management */
477 struct osdp_queue event; /* Command queue (PD Mode only) */
480 /* PD command callback to app with opaque arg pointer as passed by app */
494 struct osdp_pd *current_pd; /* current operational pd's pointer */
495 struct osdp_pd *pd; member
505 static inline void cp_keyset_complete(struct osdp_pd *pd) { } in cp_keyset_complete() argument
507 void cp_keyset_complete(struct osdp_pd *pd);
510 void osdp_keyset_complete(struct osdp_pd *pd);
516 int osdp_phy_check_packet(struct osdp_pd *pd, uint8_t *buf, int len,
520 void osdp_phy_state_reset(struct osdp_pd *pd);
544 void osdp_compute_scbk(struct osdp_pd *pd, uint8_t *master_key, uint8_t *scbk);
545 void osdp_compute_session_keys(struct osdp_pd *pd);
546 void osdp_compute_cp_cryptogram(struct osdp_pd *pd);
547 int osdp_verify_cp_cryptogram(struct osdp_pd *pd);
548 void osdp_compute_pd_cryptogram(struct osdp_pd *pd);
549 int osdp_verify_pd_cryptogram(struct osdp_pd *pd);
550 void osdp_compute_rmac_i(struct osdp_pd *pd);
551 int osdp_decrypt_data(struct osdp_pd *pd, int is_cmd, uint8_t *data, int len);
552 int osdp_encrypt_data(struct osdp_pd *pd, int is_cmd, uint8_t *data, int len);
553 int osdp_compute_mac(struct osdp_pd *pd, int is_cmd,
555 void osdp_sc_setup(struct osdp_pd *pd);
558 /* must be implemented by CP or PD */
562 static inline struct osdp *pd_to_osdp(struct osdp_pd *pd) in pd_to_osdp() argument
564 return pd->osdp_ctx; in pd_to_osdp()
569 return ctx->pd + pd_idx; in osdp_to_pd()
572 static inline bool is_pd_mode(struct osdp_pd *pd) in is_pd_mode() argument
574 return ISSET_FLAG(pd, PD_FLAG_PD_MODE); in is_pd_mode()
577 static inline bool is_cp_mode(struct osdp_pd *pd) in is_cp_mode() argument
579 return !ISSET_FLAG(pd, PD_FLAG_PD_MODE); in is_cp_mode()
582 static inline bool sc_is_capable(struct osdp_pd *pd) in sc_is_capable() argument
584 return ISSET_FLAG(pd, PD_FLAG_SC_CAPABLE); in sc_is_capable()
587 static inline bool sc_is_active(struct osdp_pd *pd) in sc_is_active() argument
589 return ISSET_FLAG(pd, PD_FLAG_SC_ACTIVE); in sc_is_active()
592 static inline void sc_activate(struct osdp_pd *pd) in sc_activate() argument
594 SET_FLAG(pd, PD_FLAG_SC_ACTIVE); in sc_activate()
597 static inline void sc_deactivate(struct osdp_pd *pd) in sc_deactivate() argument
599 CLEAR_FLAG(pd, PD_FLAG_SC_ACTIVE); in sc_deactivate()