summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/kernel/bt.h324
-rw-r--r--include/kernel/kernel/cpu.h1
-rw-r--r--include/kernel/kernel/modulemgr.h1
-rw-r--r--include/kernel/kernel/processmgr.h1
-rw-r--r--include/kernel/kernel/sysmem.h1
-rw-r--r--include/kernel/kernel/threadmgr.h3
-rw-r--r--include/kernel/net/net.h718
-rw-r--r--include/kernel/sblacmgr.h1
-rw-r--r--include/user/appmgr.h1
-rw-r--r--include/user/ctrl.h34
-rw-r--r--include/user/display.h1
-rw-r--r--include/user/io/devctl.h1
-rw-r--r--include/user/kernel/clib.h12
-rw-r--r--include/user/kernel/modulemgr.h1
-rw-r--r--include/user/kernel/processmgr.h1
-rw-r--r--include/user/kernel/rng.h1
-rw-r--r--include/user/kernel/sysmem.h1
-rw-r--r--include/user/kernel/threadmgr.h1
-rw-r--r--include/user/npdrmpackage.h51
-rw-r--r--include/user/power.h2
-rw-r--r--include/user/promoterutil.h93
-rw-r--r--include/user/pss.h1
-rw-r--r--include/user/shellutil.h1
-rw-r--r--include/user/sysmodule.h11
-rw-r--r--nids/360/SceBt.yml95
-rw-r--r--nids/360/SceKernelThreadMgr.yml6
-rw-r--r--nids/360/SceNetPs.yml17
-rw-r--r--nids/360/SceNpDrmPackage.yml9
-rw-r--r--nids/360/ScePromoterUtil.yml15
29 files changed, 1385 insertions, 20 deletions
diff --git a/include/kernel/bt.h b/include/kernel/bt.h
new file mode 100644
index 0000000..ea79015
--- /dev/null
+++ b/include/kernel/bt.h
@@ -0,0 +1,324 @@
+#ifndef _PSP2_KERNEL_BT_H_
+#define _PSP2_KERNEL_BT_H_
+
+#include <psp2/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define SCE_BT_ERROR_ACL_TX_BUF_OVERFLOW 0x802f0b03
+#define SCE_BT_ERROR_ACL_TX_CB_OVERFLOW 0x802f0b04
+#define SCE_BT_ERROR_ATT_APPLICATION_ERROR_HI 0x802f23ff
+#define SCE_BT_ERROR_ATT_APPLICATION_ERROR_LO 0x802f2380
+#define SCE_BT_ERROR_ATT_ATTRIBUTE_NOT_FOUND 0x802f230a
+#define SCE_BT_ERROR_ATT_ATTRIBUTE_NOT_LONG 0x802f230b
+#define SCE_BT_ERROR_ATT_BASE 0x802f2300
+#define SCE_BT_ERROR_ATT_INSUFFICIENT_AUTHENTICATION 0x802f2305
+#define SCE_BT_ERROR_ATT_INSUFFICIENT_AUTHORIZATION 0x802f2308
+#define SCE_BT_ERROR_ATT_INSUFFICIENT_ENCRYPTION 0x802f230f
+#define SCE_BT_ERROR_ATT_INSUFFICIENT_ENCRYPTION_KEY_SIZE 0x802f230c
+#define SCE_BT_ERROR_ATT_INSUFFICIENT_RESOURCES 0x802f2311
+#define SCE_BT_ERROR_ATT_INVALID_ATTRIBUTE_VALUE_LENGTH 0x802f230d
+#define SCE_BT_ERROR_ATT_INVALID_HANDLE 0x802f2301
+#define SCE_BT_ERROR_ATT_INVALID_OFFSET 0x802f2307
+#define SCE_BT_ERROR_ATT_INVALID_PDU 0x802f2304
+#define SCE_BT_ERROR_ATT_NOT_YET 0x802f2a07
+#define SCE_BT_ERROR_ATT_PEPARE_QUEUE_FULL 0x802f2309
+#define SCE_BT_ERROR_ATT_READ_INVALID_INTERNAL 0x802f2a03
+#define SCE_BT_ERROR_ATT_READ_INVALID_LENGTH 0x802f2a02
+#define SCE_BT_ERROR_ATT_READ_INVALID_NO 0x802f2a01
+#define SCE_BT_ERROR_ATT_READ_NOT_PERMITTED 0x802f2302
+#define SCE_BT_ERROR_ATT_REQUEST_NOT_SUPPORTED 0x802f2306
+#define SCE_BT_ERROR_ATT_UNLIKELY_ERROR 0x802f230e
+#define SCE_BT_ERROR_ATT_UNSUPPORTED_GROUP_TYPE 0x802f2310
+#define SCE_BT_ERROR_ATT_WRITE_INVALID_INTERNAL 0x802f2a06
+#define SCE_BT_ERROR_ATT_WRITE_INVALID_LENGTH 0x802f2a05
+#define SCE_BT_ERROR_ATT_WRITE_INVALID_NO 0x802f2a04
+#define SCE_BT_ERROR_ATT_WRITE_NOT_PERMITTED 0x802f2303
+#define SCE_BT_ERROR_AUDIO_COMBI_NOT_FOUND 0x802f0d16
+#define SCE_BT_ERROR_AUDIO_FREQ_IS_LE 0x802f2209
+#define SCE_BT_ERROR_AUDIO_FREQ_NOT_CONNECTED 0x802f0d0f
+#define SCE_BT_ERROR_AUDIO_INTERNAL_1 0x802f0d18
+#define SCE_BT_ERROR_AUDIO_RECV_BAD_TYPE 0x802f0d12
+#define SCE_BT_ERROR_AUDIO_RECV_BUSY 0x802f0d1a
+#define SCE_BT_ERROR_AUDIO_RECV_INVALID_LENGTH 0x802f0d0a
+#define SCE_BT_ERROR_AUDIO_RECV_IS_LE 0x802f2208
+#define SCE_BT_ERROR_AUDIO_RECV_NO_CAP 0x802f0d1d
+#define SCE_BT_ERROR_AUDIO_RECV_NOT_CONNECTED 0x802f0d08
+#define SCE_BT_ERROR_AUDIO_RECV_NOT_STARTED 0x802f0d09
+#define SCE_BT_ERROR_AUDIO_RECV_SERV_FAILED 0x802f0d1e
+#define SCE_BT_ERROR_AUDIO_SEND_BAD_TYPE 0x802f0d11
+#define SCE_BT_ERROR_AUDIO_SEND_BUSY 0x802f0d19
+#define SCE_BT_ERROR_AUDIO_SEND_INVALID_LENGTH 0x802f0d07
+#define SCE_BT_ERROR_AUDIO_SEND_IS_LE 0x802f2207
+#define SCE_BT_ERROR_AUDIO_SEND_NO_CAP 0x802f0d1b
+#define SCE_BT_ERROR_AUDIO_SEND_NO_CP 0x802f0d10
+#define SCE_BT_ERROR_AUDIO_SEND_NO_L2C 0x802f0d17
+#define SCE_BT_ERROR_AUDIO_SEND_NOT_CONNECTED 0x802f0d05
+#define SCE_BT_ERROR_AUDIO_SEND_NOT_STARTED 0x802f0d06
+#define SCE_BT_ERROR_AUDIO_SEND_SERV_FAILED 0x802f0d1c
+#define SCE_BT_ERROR_AUDIO_START_INVALID_SERV 0x802f0d0b
+#define SCE_BT_ERROR_AUDIO_START_IS_LE 0x802f2205
+#define SCE_BT_ERROR_AUDIO_START_NO_CAP 0x802f0d02
+#define SCE_BT_ERROR_AUDIO_START_NOT_CONNECTED 0x802f0d01
+#define SCE_BT_ERROR_AUDIO_START_SERV_FAILED 0x802f0d0d
+#define SCE_BT_ERROR_AUDIO_STOP_INVALID_SERV 0x802f0d0c
+#define SCE_BT_ERROR_AUDIO_STOP_IS_LE 0x802f2206
+#define SCE_BT_ERROR_AUDIO_STOP_NO_CAP 0x802f0d04
+#define SCE_BT_ERROR_AUDIO_STOP_NOT_CONNECTED 0x802f0d03
+#define SCE_BT_ERROR_AUDIO_STOP_SERV_FAILED 0x802f0d0e
+#define SCE_BT_ERROR_AVCTP_CLOSE_NO_L2C 0x802f0602
+#define SCE_BT_ERROR_AVCTP_IS_LE 0x802f2203
+#define SCE_BT_ERROR_AVCTP_NOT_CONNECTED 0x802f0604
+#define SCE_BT_ERROR_AVCTP_OPEN_NO_L2C 0x802f0601
+#define SCE_BT_ERROR_AVCTP_READ_NO_VOLUME 0x802f0608
+#define SCE_BT_ERROR_AVCTP_SEND_BUSY 0x802f0605
+#define SCE_BT_ERROR_AVCTP_SEND_NO_L2C 0x802f0603
+#define SCE_BT_ERROR_AVCTP_SEND_NO_PRESS 0x802f0606
+#define SCE_BT_ERROR_AVCTP_SEND_NO_RELEASE 0x802f0607
+#define SCE_BT_ERROR_AVCTP_SEND_NOT_RUBY 0x802f0609
+#define SCE_BT_ERROR_AVDTP_CLOSE_BAD_SERV 0x802f0502
+#define SCE_BT_ERROR_AVDTP_CLOSE_BAD_STATE 0x802f0503
+#define SCE_BT_ERROR_AVDTP_OPEN_NO_L2C 0x802f0501
+#define SCE_BT_ERROR_AVDTP_RECONF_BAD_SERV 0x802f0509
+#define SCE_BT_ERROR_AVDTP_RECONF_BAD_STATE 0x802f050a
+#define SCE_BT_ERROR_AVDTP_SEND_BAD_STATE 0x802f0508
+#define SCE_BT_ERROR_AVDTP_START_BAD_SERV 0x802f0504
+#define SCE_BT_ERROR_AVDTP_START_BAD_STATE 0x802f0505
+#define SCE_BT_ERROR_AVDTP_STOP_BAD_SERV 0x802f0506
+#define SCE_BT_ERROR_AVDTP_STOP_BAD_STATE 0x802f0507
+#define SCE_BT_ERROR_AVRCP_INVALID_PLAY_STATUS 0x802f1202
+#define SCE_BT_ERROR_AVRCP_TOO_LONG_TITLE 0x802f1201
+#define SCE_BT_ERROR_CB_NOT_REGISTERED 0x802f0c03
+#define SCE_BT_ERROR_CB_OVERFLOW 0x802f0c04
+#define SCE_BT_ERROR_CB_TOO_MANY 0x802f0c02
+#define SCE_BT_ERROR_CONF_BT_INACTIVE 0x802f1503
+#define SCE_BT_ERROR_CONF_CANT_DISABLE_FUNCTION 0x802f1508
+#define SCE_BT_ERROR_CONF_CANT_ENABLE_FUNCTION 0x802f1507
+#define SCE_BT_ERROR_CONF_CANT_ENTER 0x802f1520
+#define SCE_BT_ERROR_CONF_CARD_NOT_FOUND 0x802f1505
+#define SCE_BT_ERROR_CONF_DISABLE_SUBINTR 0x802f150c
+#define SCE_BT_ERROR_CONF_ENABLE_SUBINTR 0x802f150b
+#define SCE_BT_ERROR_CONF_FUNCTION_NOT_FOUND 0x802f1506
+#define SCE_BT_ERROR_CONF_INVALID_VALUE 0x802f1502
+#define SCE_BT_ERROR_CONF_NOT_READY 0x802f1501
+#define SCE_BT_ERROR_CONF_OFF_TIMEOUT 0x802f150e
+#define SCE_BT_ERROR_CONF_ON_TIMEOUT 0x802f150d
+#define SCE_BT_ERROR_CONF_REGISTER_SUBINTR_HANDLER 0x802f1509
+#define SCE_BT_ERROR_CONF_RELEASE_SUBINTR_HANDLER 0x802f150a
+#define SCE_BT_ERROR_CONF_SUSPEND_TIMEOUT 0x802f150f
+#define SCE_BT_ERROR_CONF_TIMEOUT 0x802f1504
+#define SCE_BT_ERROR_CONNECT_START_BUSY 0x802f0204
+#define SCE_BT_ERROR_CONNECT_START_CONNECTED 0x802f020a
+#define SCE_BT_ERROR_CONNECT_START_DELETING 0x802f020e
+#define SCE_BT_ERROR_CONNECT_START_IS_LE 0x802f2202
+#define SCE_BT_ERROR_CONNECT_START_NO_REG 0x802f0202
+#define SCE_BT_ERROR_CONNECT_START_NOT_CONNECTABLE 0x802f0203
+#define SCE_BT_ERROR_CONNECT_START_REG_FULL 0x802f0209
+#define SCE_BT_ERROR_CONNECT_START_TOO_MANY 0x802f020d
+#define SCE_BT_ERROR_COPYIN_FAILED 0x802f0b09
+#define SCE_BT_ERROR_COPYOUT_FAILED 0x802f0b0a
+#define SCE_BT_ERROR_DISCONNECT_START_NOT_CONNECTED 0x802f0205
+#define SCE_BT_ERROR_GATT_BUSY 0x802f2403
+#define SCE_BT_ERROR_GATT_DISCONNECT 0x802f240a
+#define SCE_BT_ERROR_GATT_ENTER 0x802f240c
+#define SCE_BT_ERROR_GATT_INVALID_FLAGS 0x802f2405
+#define SCE_BT_ERROR_GATT_INVALID_HANDLE 0x802f2404
+#define SCE_BT_ERROR_GATT_INVALID_NO 0x802f2401
+#define SCE_BT_ERROR_GATT_INVALID_SIZE 0x802f2406
+#define SCE_BT_ERROR_GATT_NOT_CONNECTED 0x802f2402
+#define SCE_BT_ERROR_GATT_NOT_LE 0x802f2407
+#define SCE_BT_ERROR_GATT_NOT_YET 0x802f2409
+#define SCE_BT_ERROR_GATT_TOO_BIG_BUFFER 0x802f240d
+#define SCE_BT_ERROR_GATT_TOO_BIG_RECORD 0x802f2408
+#define SCE_BT_ERROR_GATT_TSLEEP 0x802f240b
+#define SCE_BT_ERROR_GET_DEBUG_INFO_INVALID_ARGUMENT 0x802f2105
+#define SCE_BT_ERROR_GET_DEBUG_INFO_INVALID_REQUEST 0x802f2101
+#define SCE_BT_ERROR_GET_DEBUG_INFO_INVALID_SIZE 0x802f2103
+#define SCE_BT_ERROR_GET_DEBUG_INFO_INVALID_STATE 0x802f2107
+#define SCE_BT_ERROR_GET_DEBUG_INFO_NOT_CONNECTED 0x802f2109
+#define SCE_BT_ERROR_GET_JACK_STATUS_NOT_CONNECTED 0x802f3301
+#define SCE_BT_ERROR_GET_NAME_NO_DEVICE 0x802f0c01
+#define SCE_BT_ERROR_HCI_TX_OVERFLOW 0x802f0b02
+#define SCE_BT_ERROR_HID_CLOSE_NO_L2C 0x802f0902
+#define SCE_BT_ERROR_HID_INVALID_BUFFER_ADDRESS 0x802f0907
+#define SCE_BT_ERROR_HID_INVALID_IDLE 0x802f0909
+#define SCE_BT_ERROR_HID_INVALID_LENGTH 0x802f090d
+#define SCE_BT_ERROR_HID_INVALID_PROTOCOL 0x802f0908
+#define SCE_BT_ERROR_HID_INVALID_REPORT_ID 0x802f090e
+#define SCE_BT_ERROR_HID_INVALID_REQUEST_TYPE 0x802f0906
+#define SCE_BT_ERROR_HID_IS_LE 0x802f2204
+#define SCE_BT_ERROR_HID_NO_CAP 0x802f0905
+#define SCE_BT_ERROR_HID_NOT_CONNECTED 0x802f0904
+#define SCE_BT_ERROR_HID_NOT_YET 0x802f090c
+#define SCE_BT_ERROR_HID_OPEN_NO_L2C 0x802f0901
+#define SCE_BT_ERROR_HID_OVERWRITE_REQ 0x802f090f
+#define SCE_BT_ERROR_HID_RECV_INVALID_LENGTH 0x802f0e02
+#define SCE_BT_ERROR_HID_RECV_NOT_CONNECTED 0x802f0e01
+#define SCE_BT_ERROR_HID_SEND_NO_L2C 0x802f0903
+#define SCE_BT_ERROR_INQUIRY_START_BUSY 0x802f0201
+#define SCE_BT_ERROR_JEDI_SNIFF_NOT_CONNECTED 0x802f3601
+#define SCE_BT_ERROR_JEDI_SNIFF_NOT_JEDI 0x802f3602
+#define SCE_BT_ERROR_JEDI_VOLUME_GAIN_NOT_CONNECTED 0x802f3501
+#define SCE_BT_ERROR_JUMBO_UNLOCK_NOT_OWNER 0x802f0b01
+#define SCE_BT_ERROR_KPROC_CREATE 0x802f2002
+#define SCE_BT_ERROR_LE_CREATE_CONNECTION_BUSY 0x802f290d
+#define SCE_BT_ERROR_LE_CREATE_CONNECTION_CONNECTED 0x802f290b
+#define SCE_BT_ERROR_LE_CREATE_CONNECTION_FULL 0x802f290c
+#define SCE_BT_ERROR_LE_CREATE_CONNECTION_INVALID_INTERVAL_MAX 0x802f2906
+#define SCE_BT_ERROR_LE_CREATE_CONNECTION_INVALID_INTERVAL_MIN 0x802f2905
+#define SCE_BT_ERROR_LE_CREATE_CONNECTION_INVALID_LATENCY 0x802f2907
+#define SCE_BT_ERROR_LE_CREATE_CONNECTION_INVALID_OWN_ADDRESS_TYPE 0x802f2904
+#define SCE_BT_ERROR_LE_CREATE_CONNECTION_INVALID_PEER_ADDRESS 0x802f2903
+#define SCE_BT_ERROR_LE_CREATE_CONNECTION_INVALID_SCAN_INTERVAL 0x802f2901
+#define SCE_BT_ERROR_LE_CREATE_CONNECTION_INVALID_SCAN_WINDOW 0x802f2902
+#define SCE_BT_ERROR_LE_CREATE_CONNECTION_INVALID_TIMEOUT 0x802f2908
+#define SCE_BT_ERROR_LE_CREATE_CONNECTION_REG_ERROR 0x802f290a
+#define SCE_BT_ERROR_LE_CREATE_CONNECTION_REG_FULL 0x802f2909
+#define SCE_BT_ERROR_LE_GET_ADVERTISING_NOT_FOUND 0x802f2801
+#define SCE_BT_ERROR_LE_NOT_SUPPORTED 0x802f2b01
+#define SCE_BT_ERROR_LE_SET_ADVERTISING_INVALID_DIRECT_ADDRESS 0x802f2607
+#define SCE_BT_ERROR_LE_SET_ADVERTISING_INVALID_DIRECT_ADDRESS_TYPE 0x802f2606
+#define SCE_BT_ERROR_LE_SET_ADVERTISING_INVALID_INTERVAL_MAX 0x802f2604
+#define SCE_BT_ERROR_LE_SET_ADVERTISING_INVALID_INTERVAL_MIN 0x802f2603
+#define SCE_BT_ERROR_LE_SET_ADVERTISING_INVALID_LENGTH 0x802f2602
+#define SCE_BT_ERROR_LE_SET_ADVERTISING_INVALID_OWN_ADDRESS_TYPE 0x802f2605
+#define SCE_BT_ERROR_LE_SET_ADVERTISING_INVALID_REQ 0x802f2601
+#define SCE_BT_ERROR_LE_SET_SCAN_INVALID_INTERVAL 0x802f2703
+#define SCE_BT_ERROR_LE_SET_SCAN_INVALID_LENGTH 0x802f2702
+#define SCE_BT_ERROR_LE_SET_SCAN_INVALID_OWN_ADDRESS_TYPE 0x802f2705
+#define SCE_BT_ERROR_LE_SET_SCAN_INVALID_REQ 0x802f2701
+#define SCE_BT_ERROR_LE_SET_SCAN_INVALID_WINDOW 0x802f2704
+#define SCE_BT_ERROR_NOT_READY 0x802f3201
+#define SCE_BT_ERROR_NOT_SUPPORTED_DEVICE 0x802f3403
+#define SCE_BT_ERROR_NOTIMP 0x802f2001
+#define SCE_BT_ERROR_PAIRING_OOB_CAN_NOT_DISCONNECT 0x802f3103
+#define SCE_BT_ERROR_PAIRING_OOB_FULL 0x802f3102
+#define SCE_BT_ERROR_PAIRING_OOB_INTERNAL_ERROR 0x802f3104
+#define SCE_BT_ERROR_PAIRING_OOB_TIMEOUT 0x802f3101
+#define SCE_BT_ERROR_PIN_INVALID_LENGTH 0x802f0206
+#define SCE_BT_ERROR_PIN_IS_LE 0x802f2201
+#define SCE_BT_ERROR_REG_CANNOT_LOAD 0x802f010a
+#define SCE_BT_ERROR_REG_CANNOT_OPEN 0x802f010b
+#define SCE_BT_ERROR_REG_CANNOT_READ 0x802f010c
+#define SCE_BT_ERROR_REG_CANNOT_WRITE 0x802f010d
+#define SCE_BT_ERROR_REG_DELETE_CONNECTING 0x802f0109
+#define SCE_BT_ERROR_REG_DELETE_NO_ENTRY 0x802f0102
+#define SCE_BT_ERROR_REG_GET_HID_DESC_NO_REG 0x802f0107
+#define SCE_BT_ERROR_REG_GET_HID_DESC_TOO_SHORT 0x802f0108
+#define SCE_BT_ERROR_REG_NOT_READY 0x802f0101
+#define SCE_BT_ERROR_REG_SET_HID_DESC_BAD_ARG 0x802f0105
+#define SCE_BT_ERROR_REG_SET_HID_DESC_NO_REG 0x802f0106
+#define SCE_BT_ERROR_REG_UPDATE_CANNOT_SAVE 0x802f0103
+#define SCE_BT_ERROR_SDIO_DISABLE_FUNCTION 0x802f2009
+#define SCE_BT_ERROR_SDIO_ENABLE_FUNCTION 0x802f2008
+#define SCE_BT_ERROR_SDIO_GET_FUNCTION 0x802f2003
+#define SCE_BT_ERROR_SDIO_LOCK 0x802f2006
+#define SCE_BT_ERROR_SDIO_READ_DIR 0x802f200c
+#define SCE_BT_ERROR_SDIO_READ_FIX 0x802f200e
+#define SCE_BT_ERROR_SDIO_REGISTER_INTR_HANDLER 0x802f2004
+#define SCE_BT_ERROR_SDIO_SET_BLOCK_LEN 0x802f200a
+#define SCE_BT_ERROR_SDIO_SET_BUS_SPEED 0x802f200b
+#define SCE_BT_ERROR_SDIO_UNLOCK 0x802f2007
+#define SCE_BT_ERROR_SDIO_UNREGISTER_INTR_HANDLER 0x802f2005
+#define SCE_BT_ERROR_SDIO_WRITE_DIR 0x802f200d
+#define SCE_BT_ERROR_SDIO_WRITE_FIX 0x802f200f
+#define SCE_BT_ERROR_SDP_OPEN_NO_L2C 0x802f0208
+#define SCE_BT_ERROR_SET_DEBUG_INFO_INVALID_ARGUMENT 0x802f2106
+#define SCE_BT_ERROR_SET_DEBUG_INFO_INVALID_REQUEST 0x802f2102
+#define SCE_BT_ERROR_SET_DEBUG_INFO_INVALID_SIZE 0x802f2104
+#define SCE_BT_ERROR_SET_DEBUG_INFO_INVALID_STATE 0x802f2108
+#define SCE_BT_ERROR_SET_DEBUG_INFO_NOT_CONNECTED 0x802f210a
+#define SCE_BT_ERROR_SM_INVALID_CONFIRM_REPLY 0x802f2505
+#define SCE_BT_ERROR_SM_INVALID_KEY_LENGTH 0x802f2501
+#define SCE_BT_ERROR_SM_NO_REQ 0x802f2503
+#define SCE_BT_ERROR_SM_NOT_DIGIT 0x802f2502
+#define SCE_BT_ERROR_SM_NOT_NEEDED_PIN 0x802f2504
+#define SCE_BT_ERROR_TIMER_CANCEL_BAD_ID 0x802f0b05
+#define SCE_BT_ERROR_TIMER_CANCEL_NOT_INITIALIZED 0x802f0b06
+#define SCE_BT_ERROR_TIMER_SET_NO_SPACE 0x802f0b08
+#define SCE_BT_ERROR_TIMER_SET_NOT_INITIALIZED 0x802f0b07
+#define SCE_BT_ERROR_TOO_MANY_CONNECTION 0x802f3401
+#define SCE_BT_ERROR_TOO_MANY_HID 0x802f3402
+#define SCE_BT_ERROR_TSLEEP 0x802f2010
+#define SCE_BT_ERROR_USER_CONFIRM_NOT_CONNECTED 0x802f0207
+
+typedef struct {
+ unsigned char mac[5];
+ unsigned char unk1[32 - 5];
+ char name[128];
+ unsigned char unk2[128];
+} SceBtRegisteredInfo; /* size = 0x100 */
+
+typedef struct {
+ // mac0 is at *(unsigned int *)&data[0x08];
+ // mac1 is at *(unsigned int *)&data[0x0C];
+ unsigned char data[0x10];
+} SceBtEvent;
+
+typedef void (*SceBtCallback)(int r0, int r1, int r2, int r3);
+
+typedef struct _SceBtHidRequest {
+ uint32_t unk00;
+ uint32_t unk04;
+ uint8_t type; //@0x08, 0 = read?, 1 = write?, 2 = feature?, 3 = ?
+ uint8_t unk09;
+ uint8_t unk0A;
+ uint8_t unk0B;
+ void *buffer; // 0x0C
+ uint32_t length; // 0x10
+ struct _SceBtHidRequest *next;
+} __attribute__((packed)) SceBtHidRequest; /* size = 0x18 */
+
+int sceBtAvrcpReadVolume(int r0, int r1, int r2, int r3);
+int sceBtAvrcpSendButton(int r0, int r1, int r2, int r3);
+int sceBtAvrcpSendVolume(int r0, int r1, int r2, int r3);
+int sceBtAvrcpSetPlayStatus(int r0, int r1, int r2, int r3);
+int sceBtAvrcpSetTitle(int r0, int r1, int r2, int r3);
+int sceBtDeleteRegisteredInfo(int r0, int r1, int r2, int r3);
+int sceBtFreqAudio(int r0, int r1, int r2, int r3);
+int sceBtGetConfiguration(void); // returns 0x0 BT disabled, 0x9 if enabled
+int sceBtGetConnectingInfo(unsigned int mac0, unsigned int mac1); // 1 = disconnected?, 2 = connecting?, 5 = connected?
+int sceBtGetDeviceName(unsigned int mac0, unsigned int mac1, char name[0x79]);
+int sceBtGetInfoForTest(int r0, int r1, int r2, int r3);
+int sceBtGetLastError(void);
+int sceBtGetRegisteredInfo(int device, int unk, SceBtRegisteredInfo *info, unsigned int info_size);
+int sceBtGetStatusForTest(int r0, int r1, int r2, int r3);
+int sceBtGetVidPid(unsigned int mac0, unsigned int mac1, unsigned short vid_pid[2]);
+int sceBtHfpGetCurrentPhoneNumber(int r0, int r1, int r2, int r3);
+int sceBtHfpRequest(int r0, int r1, int r2, int r3);
+int sceBtHidGetReportDescriptor(unsigned int mac0, unsigned int mac1, void *buffer, unsigned int size);
+int sceBtHidTransfer(unsigned int mac0, unsigned int mac1, SceBtHidRequest *request);
+int sceBtPairingOOB(int r0, int r1, int r2, int r3);
+int sceBtPushBip(int r0, int r1, int r2, int r3);
+int sceBtPushOpp(int r0, int r1, int r2, int r3);
+int sceBtReadEvent(SceBtEvent *events, int num_events);
+int sceBtRecvAudio(int r0, int r1, int r2, int r3);
+int sceBtRecvBip(int r0, int r1, int r2, int r3);
+int sceBtRecvOpp(int r0, int r1, int r2, int r3);
+int sceBtRecvSpp(int r0, int r1, int r2, int r3);
+int sceBtRegisterCallback(SceUID cb, int unused, int flags1, int flags2); // looks like flags1 is a mask for permitted MACs
+int sceBtReplyPinCode(unsigned int mac0, unsigned int mac1, unsigned char *code, unsigned int length);
+int sceBtReplyUserConfirmation(unsigned int mac0, unsigned int mac1, int unk);
+int sceBtSendAudio(int r0, int r1, int r2, int r3);
+int sceBtSendL2capEchoRequestForTest(int r0, int r1, int r2, int r3);
+int sceBtSendSpp(int r0, int r1, int r2, int r3);
+int sceBtSetConfiguration(int r0); //0 = disable bt, 1 = enabling, 2 = enabled 3 = disabling?
+int sceBtSetContentProtection(int r0);
+int sceBtSetInquiryResultForTest(unsigned char *);
+int sceBtSetInquiryScan(int r0);
+int sceBtSetL2capEchoResponseBufferForTest(int r0, int r1, int r2, int r3);
+int sceBtSetStatusForTest(int r0, int r1, int r2, int r3);
+int sceBtStartAudio(int r0, int r1, int r2, int r3);
+int sceBtStartConnect(unsigned int mac0, unsigned int mac1); // mac0 can be used as a device index (already paired devices)?
+int sceBtStartDisconnect(unsigned int mac0, unsigned int mac1);
+int sceBtStartInquiry(void);
+int sceBtStopAudio(int r0, int r1, int r2, int r3);
+int sceBtStopInquiry(void);
+int sceBtUnregisterCallback(SceUID cb);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/include/kernel/kernel/cpu.h b/include/kernel/kernel/cpu.h
index 5c84c46..a961f86 100644
--- a/include/kernel/kernel/cpu.h
+++ b/include/kernel/kernel/cpu.h
@@ -139,3 +139,4 @@ int sceKernelCpuUnrestrictedMemcpy(void *dst, const void *src, size_t len);
#endif
#endif /* _PSP2_KERNEL_CPU_H_ */
+
diff --git a/include/kernel/kernel/modulemgr.h b/include/kernel/kernel/modulemgr.h
index 5d7a956..ee6ece2 100644
--- a/include/kernel/kernel/modulemgr.h
+++ b/include/kernel/kernel/modulemgr.h
@@ -97,3 +97,4 @@ int sceKernelStopUnloadModuleForPid(SceUID pid, SceUID modid, SceSize args, void
#endif
#endif /* _PSP2_KERNEL_MODULEMGR_H_ */
+
diff --git a/include/kernel/kernel/processmgr.h b/include/kernel/kernel/processmgr.h
index 963d42c..2d30b94 100644
--- a/include/kernel/kernel/processmgr.h
+++ b/include/kernel/kernel/processmgr.h
@@ -14,3 +14,4 @@ void *sceKernelGetProcessKernelBuf(SceUID pid);
#endif
#endif /* _PSP2_KERNEL_PROCESSMGR_H_ */
+
diff --git a/include/kernel/kernel/sysmem.h b/include/kernel/kernel/sysmem.h
index 1679177..a263ca8 100644
--- a/include/kernel/kernel/sysmem.h
+++ b/include/kernel/kernel/sysmem.h
@@ -152,3 +152,4 @@ int sceKernelMapBlockUserVisible(SceUID uid);
#endif
#endif
+
diff --git a/include/kernel/kernel/threadmgr.h b/include/kernel/kernel/threadmgr.h
index 9fe1faf..16b3234 100644
--- a/include/kernel/kernel/threadmgr.h
+++ b/include/kernel/kernel/threadmgr.h
@@ -100,7 +100,7 @@ typedef enum SceThreadStatus
} SceThreadStatus;
/**
- * Create a thread
+ * \brief Create a thread
*
* @par Example:
* @code
@@ -1066,3 +1066,4 @@ int sceKernelRunWithStack(int stack_size, int (*to_call)(void *), void *args);
#endif
#endif /* _PSP2_KERNEL_THREADMGR_H_ */
+
diff --git a/include/kernel/net/net.h b/include/kernel/net/net.h
new file mode 100644
index 0000000..4faffb4
--- /dev/null
+++ b/include/kernel/net/net.h
@@ -0,0 +1,718 @@
+#ifndef _PSP2_KERNEL_NET_NET_H_
+#define _PSP2_KERNEL_NET_NET_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** Net Error Codes */
+enum {
+ SCE_NET_ERROR_EPERM = 0x80410101,
+ SCE_NET_ERROR_ENOENT = 0x80410102,
+ SCE_NET_ERROR_ESRCH = 0x80410103,
+ SCE_NET_ERROR_EINTR = 0x80410104,
+ SCE_NET_ERROR_EIO = 0x80410105,
+ SCE_NET_ERROR_ENXIO = 0x80410106,
+ SCE_NET_ERROR_E2BIG = 0x80410107,
+ SCE_NET_ERROR_ENOEXEC = 0x80410108,
+ SCE_NET_ERROR_EBADF = 0x80410109,
+ SCE_NET_ERROR_ECHILD = 0x8041010A,
+ SCE_NET_ERROR_EDEADLK = 0x8041010B,
+ SCE_NET_ERROR_ENOMEM = 0x8041010C,
+ SCE_NET_ERROR_EACCES = 0x8041010D,
+ SCE_NET_ERROR_EFAULT = 0x8041010E,
+ SCE_NET_ERROR_ENOTBLK = 0x8041010F,
+ SCE_NET_ERROR_EBUSY = 0x80410110,
+ SCE_NET_ERROR_EEXIST = 0x80410111,
+ SCE_NET_ERROR_EXDEV = 0x80410112,
+ SCE_NET_ERROR_ENODEV = 0x80410113,
+ SCE_NET_ERROR_ENOTDIR = 0x80410114,
+ SCE_NET_ERROR_EISDIR = 0x80410115,
+ SCE_NET_ERROR_EINVAL = 0x80410116,
+ SCE_NET_ERROR_ENFILE = 0x80410117,
+ SCE_NET_ERROR_EMFILE = 0x80410118,
+ SCE_NET_ERROR_ENOTTY = 0x80410119,
+ SCE_NET_ERROR_ETXTBSY = 0x8041011A,
+ SCE_NET_ERROR_EFBIG = 0x8041011B,
+ SCE_NET_ERROR_ENOSPC = 0x8041011C,
+ SCE_NET_ERROR_ESPIPE = 0x8041011D,
+ SCE_NET_ERROR_EROFS = 0x8041011E,
+ SCE_NET_ERROR_EMLINK = 0x8041011F,
+ SCE_NET_ERROR_EPIPE = 0x80410120,
+ SCE_NET_ERROR_EDOM = 0x80410121,
+ SCE_NET_ERROR_ERANGE = 0x80410122,
+ SCE_NET_ERROR_EAGAIN = 0x80410123,
+ SCE_NET_ERROR_EWOULDBLOCK = 0x80410123,
+ SCE_NET_ERROR_EINPROGRESS = 0x80410124,
+ SCE_NET_ERROR_EALREADY = 0x80410125,
+ SCE_NET_ERROR_ENOTSOCK = 0x80410126,
+ SCE_NET_ERROR_EDESTADDRREQ = 0x80410127,
+ SCE_NET_ERROR_EMSGSIZE = 0x80410128,
+ SCE_NET_ERROR_EPROTOTYPE = 0x80410129,
+ SCE_NET_ERROR_ENOPROTOOPT = 0x8041012A,
+ SCE_NET_ERROR_EPROTONOSUPPORT = 0x8041012B,
+ SCE_NET_ERROR_ESOCKTNOSUPPOR = 0x8041012C,
+ SCE_NET_ERROR_EOPNOTSUPP = 0x8041012D,
+ SCE_NET_ERROR_EPFNOSUPPORT = 0x8041012E,
+ SCE_NET_ERROR_EAFNOSUPPORT = 0x8041012F,
+ SCE_NET_ERROR_EADDRINUSE = 0x80410130,
+ SCE_NET_ERROR_EADDRNOTAVAIL = 0x80410131,
+ SCE_NET_ERROR_ENETDOWN = 0x80410132,
+ SCE_NET_ERROR_ENETUNREACH = 0x80410133,
+ SCE_NET_ERROR_ENETRESET = 0x80410134,
+ SCE_NET_ERROR_ECONNABORTED = 0x80410135,
+ SCE_NET_ERROR_ECONNRESET = 0x80410136,
+ SCE_NET_ERROR_ENOBUFS = 0x80410137,
+ SCE_NET_ERROR_EISCONN = 0x80410138,
+ SCE_NET_ERROR_ENOTCONN = 0x80410139,
+ SCE_NET_ERROR_ESHUTDOWN = 0x8041013A,
+ SCE_NET_ERROR_ETOOMANYREFS = 0x8041013B,
+ SCE_NET_ERROR_ETIMEDOUT = 0x8041013C,
+ SCE_NET_ERROR_ECONNREFUSED = 0x8041013D,
+ SCE_NET_ERROR_ELOOP = 0x8041013E,
+ SCE_NET_ERROR_ENAMETOOLONG = 0x8041013F,
+ SCE_NET_ERROR_EHOSTDOWN = 0x80410140,
+ SCE_NET_ERROR_EHOSTUNREACH = 0x80410141,
+ SCE_NET_ERROR_ENOTEMPTY = 0x80410142,
+ SCE_NET_ERROR_EPROCLIM = 0x80410143,
+ SCE_NET_ERROR_EUSERS = 0x80410144,
+ SCE_NET_ERROR_EDQUOT = 0x80410145,
+ SCE_NET_ERROR_ESTALE = 0x80410146,
+ SCE_NET_ERROR_EREMOTE = 0x80410147,
+ SCE_NET_ERROR_EBADRPC = 0x80410148,
+ SCE_NET_ERROR_ERPCMISMATCH = 0x80410149,
+ SCE_NET_ERROR_EPROGUNAVAIL = 0x8041014A,
+ SCE_NET_ERROR_EPROGMISMATCH = 0x8041014B,
+ SCE_NET_ERROR_EPROCUNAVAIL = 0x8041014C,
+ SCE_NET_ERROR_ENOLCK = 0x8041014D,
+ SCE_NET_ERROR_ENOSYS = 0x8041014E,
+ SCE_NET_ERROR_EFTYPE = 0x8041014F,
+ SCE_NET_ERROR_EAUTH = 0x80410150,
+ SCE_NET_ERROR_ENEEDAUTH = 0x80410151,
+ SCE_NET_ERROR_EIDRM = 0x80410152,
+ SCE_NET_ERROR_ENOMS = 0x80410153,
+ SCE_NET_ERROR_EOVERFLOW = 0x80410154,
+ SCE_NET_ERROR_EILSEQ = 0x80410155,
+ SCE_NET_ERROR_ENOTSUP = 0x80410156,
+ SCE_NET_ERROR_ECANCELED = 0x80410157,
+ SCE_NET_ERROR_EBADMSG = 0x80410158,
+ SCE_NET_ERROR_ENODATA = 0x80410159,
+ SCE_NET_ERROR_ENOSR = 0x8041015A,
+ SCE_NET_ERROR_ENOSTR = 0x8041015B,
+ SCE_NET_ERROR_ETIME = 0x8041015C,
+ SCE_NET_ERROR_EADHOC = 0x804101A0,
+ SCE_NET_ERROR_EDISABLEDIF = 0x804101A1,
+ SCE_NET_ERROR_ERESUME = 0x804101A2,
+ SCE_NET_ERROR_ENOTINIT = 0x804101C8,
+ SCE_NET_ERROR_ENOLIBMEM = 0x804101C9,
+ SCE_NET_ERROR_ERESERVED202 = 0x804101CA,
+ SCE_NET_ERROR_ECALLBACK = 0x804101CB,
+ SCE_NET_ERROR_EINTERNAL = 0x804101CC,
+ SCE_NET_ERROR_ERETURN = 0x804101CD,
+ SCE_NET_ERROR_RESOLVER_EINTERNAL = 0x804101DC,
+ SCE_NET_ERROR_RESOLVER_EBUSY = 0x804101DD,
+ SCE_NET_ERROR_RESOLVER_ENOSPACE = 0x804101DE,
+ SCE_NET_ERROR_RESOLVER_EPACKET = 0x804101DF,
+ SCE_NET_ERROR_RESOLVER_ERESERVED22 = 0x804101E0,
+ SCE_NET_ERROR_RESOLVER_ENODNS = 0x804101E1,
+ SCE_NET_ERROR_RESOLVER_ETIMEDOUT = 0x804101E2,
+ SCE_NET_ERROR_RESOLVER_ENOSUPPORT = 0x804101E3,
+ SCE_NET_ERROR_RESOLVER_EFORMAT = 0x804101E4,
+ SCE_NET_ERROR_RESOLVER_ESERVERFAILURE = 0x804101E5,
+ SCE_NET_ERROR_RESOLVER_ENOHOST = 0x804101E6,
+ SCE_NET_ERROR_RESOLVER_ENOTIMPLEMENTED = 0x804101E7,
+ SCE_NET_ERROR_RESOLVER_ESERVERREFUSED = 0x804101E8,
+ SCE_NET_ERROR_RESOLVER_ENORECORD = 0x804101E9,
+ SCE_NET_ERROR_RESOLVER_EALIGNMENT = 0x804101EA
+};
+
+/** Specific kernel and libnet error codes */
+enum {
+ SCE_NET_EPERM = 1,
+ SCE_NET_ENOENT = 2,
+ SCE_NET_ESRCH = 3,
+ SCE_NET_EINTR = 4,
+ SCE_NET_EIO = 5,
+ SCE_NET_ENXIO = 6,
+ SCE_NET_E2BIG = 7,
+ SCE_NET_ENOEXEC = 8,
+ SCE_NET_EBADF = 9,
+ SCE_NET_ECHILD = 10,
+ SCE_NET_EDEADLK = 11,
+ SCE_NET_ENOMEM = 12,
+ SCE_NET_EACCES = 13,
+ SCE_NET_EFAULT = 14,
+ SCE_NET_ENOTBLK = 15,
+ SCE_NET_EBUSY = 16,
+ SCE_NET_EEXIST = 17,
+ SCE_NET_EXDEV = 18,
+ SCE_NET_ENODEV = 19,
+ SCE_NET_ENOTDIR = 20,
+ SCE_NET_EISDIR = 21,
+ SCE_NET_EINVAL = 22,
+ SCE_NET_ENFILE = 23,
+ SCE_NET_EMFILE = 24,
+ SCE_NET_ENOTTY = 25,
+ SCE_NET_ETXTBSY = 26,
+ SCE_NET_EFBIG = 27,
+ SCE_NET_ENOSPC = 28,
+ SCE_NET_ESPIPE = 29,
+ SCE_NET_EROFS = 30,
+ SCE_NET_EMLINK = 31,
+ SCE_NET_EPIPE = 32,
+ SCE_NET_EDOM = 33,
+ SCE_NET_ERANGE = 34,
+ SCE_NET_EAGAIN = 35,
+ SCE_NET_EWOULDBLOCK = 35,
+ SCE_NET_EINPROGRESS = 36,
+ SCE_NET_EALREADY = 37,
+ SCE_NET_ENOTSOCK = 38,
+ SCE_NET_EDESTADDRREQ = 39,
+ SCE_NET_EMSGSIZE = 40,
+ SCE_NET_EPROTOTYPE = 41,
+ SCE_NET_ENOPROTOOPT = 42,
+ SCE_NET_EPROTONOSUPPORT = 43,
+ SCE_NET_ESOCKTNOSUPPORT = 44,
+ SCE_NET_EOPNOTSUPP = 45,
+ SCE_NET_EPFNOSUPPORT = 46,
+ SCE_NET_EAFNOSUPPORT = 47,
+ SCE_NET_EADDRINUSE = 48,
+ SCE_NET_EADDRNOTAVAIL = 49,
+ SCE_NET_ENETDOWN = 50,
+ SCE_NET_ENETUNREACH = 51,
+ SCE_NET_ENETRESET = 52,
+ SCE_NET_ECONNABORTED = 53,
+ SCE_NET_ECONNRESET = 54,
+ SCE_NET_ENOBUFS = 55,
+ SCE_NET_EISCONN = 56,
+ SCE_NET_ENOTCONN = 57,
+ SCE_NET_ESHUTDOWN = 58,
+ SCE_NET_ETOOMANYREFS = 59,
+ SCE_NET_ETIMEDOUT = 60,
+ SCE_NET_ECONNREFUSED = 61,
+ SCE_NET_ELOOP = 62,
+ SCE_NET_ENAMETOOLONG = 63,
+ SCE_NET_EHOSTDOWN = 64,
+ SCE_NET_EHOSTUNREACH = 65,
+ SCE_NET_ENOTEMPTY = 66,
+ SCE_NET_EPROCLIM = 67,
+ SCE_NET_EUSERS = 68,
+ SCE_NET_EDQUOT = 69,
+ SCE_NET_ESTALE = 70,
+ SCE_NET_EREMOTE = 71,
+ SCE_NET_EBADRPC = 72,
+ SCE_NET_ERPCMISMATCH = 73,
+ SCE_NET_EPROGUNAVAIL = 74,
+ SCE_NET_EPROGMISMATCH = 75,
+ SCE_NET_EPROCUNAVAIL = 76,
+ SCE_NET_ENOLCK = 77,
+ SCE_NET_ENOSYS = 78,
+ SCE_NET_EFTYPE = 79,
+ SCE_NET_EAUTH = 80,
+ SCE_NET_ENEEDAUTH = 81,
+ SCE_NET_EIDRM = 82,
+ SCE_NET_ENOMSG = 83,
+ SCE_NET_EOVERFLOW = 84,
+ SCE_NET_EILSEQ = 85,
+ SCE_NET_ENOTSUP = 86,
+ SCE_NET_ECANCELED = 87,
+ SCE_NET_EBADMSG = 88,
+ SCE_NET_ENODATA = 89,
+ SCE_NET_ENOSR = 90,
+ SCE_NET_ENOSTR = 91,
+ SCE_NET_ETIME = 92,
+ SCE_NET_EADHOC = 160,
+ SCE_NET_EDISABLEDIF = 161,
+ SCE_NET_ERESUME = 162
+};
+
+
+/** libnet specific error codes */
+enum {
+ SCE_NET_ENOTINIT = 200,
+ SCE_NET_ENOLIBMEM,
+ SCE_NET_ETLS,
+ SCE_NET_ECALLBACK,
+ SCE_NET_EINTERNAL,
+ SCE_NET_ERETURN
+};
+
+/** Resolver specific error codes */
+enum {
+ SCE_NET_RESOLVER_EINTERNAL = 220,
+ SCE_NET_RESOLVER_EBUSY,
+ SCE_NET_RESOLVER_ENOSPACE,
+ SCE_NET_RESOLVER_EPACKET,
+ SCE_NET_RESOLVER_ERESERVED224,
+ SCE_NET_RESOLVER_ENODNS,
+ SCE_NET_RESOLVER_ETIMEDOUT,
+ SCE_NET_RESOLVER_ENOSUPPORT,
+ SCE_NET_RESOLVER_EFORMAT,
+ SCE_NET_RESOLVER_ESERVERFAILURE,
+ SCE_NET_RESOLVER_ENOHOST,
+ SCE_NET_RESOLVER_ENOTIMPLEMENTED,
+ SCE_NET_RESOLVER_ESERVERREFUSED,
+ SCE_NET_RESOLVER_ENORECORD,
+ SCE_NET_RESOLVER_EALIGNMENT
+};
+
+/** Flags to specify as argument to ::sceNetDumpRead() */
+enum {
+ SCE_NET_DUMP_PEEK = 0x00000010,
+ SCE_NET_DUMP_DONTWAIT = 0x00000020,
+ SCE_NET_DUMP_OVERFLOW = 0x00000040,
+ SCE_NET_DUMP_ABORT_FLAG_PRESERVATION = 0x00000001
+};
+
+/** Events for ::SceNetEpollEvent */
+enum {
+ SCE_NET_EPOLLIN = 0x00000001,
+ SCE_NET_EPOLLOUT = 0x00000002,
+ SCE_NET_EPOLLERR = 0x00000008,
+ SCE_NET_EPOLLHUP = 0x00000010,
+ SCE_NET_EPOLLDESCID = 0x00010000
+};
+
+/** Flags to specify as argument to ::sceNetEpollControl() */
+enum {
+ SCE_NET_EPOLL_CTL_ADD = 1,
+ SCE_NET_EPOLL_CTL_MOD,
+ SCE_NET_EPOLL_CTL_DEL
+};
+
+/** state for ::SceNetSockInfo structure */
+enum {
+ SCE_NET_SOCKINFO_STATE_UNKNOWN,
+ SCE_NET_SOCKINFO_STATE_CLOSED,
+ SCE_NET_SOCKINFO_STATE_OPENED,
+ SCE_NET_SOCKINFO_STATE_LISTEN,
+ SCE_NET_SOCKINFO_STATE_SYN_SENT,
+ SCE_NET_SOCKINFO_STATE_SYN_RECEIVED,
+ SCE_NET_SOCKINFO_STATE_ESTABLISHED,
+ SCE_NET_SOCKINFO_STATE_FIN_WAIT_1,
+ SCE_NET_SOCKINFO_STATE_FIN_WAIT_2,
+ SCE_NET_SOCKINFO_STATE_CLOSE_WAIT,
+ SCE_NET_SOCKINFO_STATE_CLOSING,
+ SCE_NET_SOCKINFO_STATE_LAST_ACK,
+ SCE_NET_SOCKINFO_STATE_TIME_WAIT
+};
+
+/** flags for ::SceNetSockInfo structure */
+enum {
+ SCE_NET_SOCKINFO_F_SELF = 0x00000001,
+ SCE_NET_SOCKINFO_F_KERNEL = 0x00000002,
+ SCE_NET_SOCKINFO_F_OTHERS = 0x00000004,
+ SCE_NET_SOCKINFO_F_RECV_WAIT = 0x00010000,
+ SCE_NET_SOCKINFO_F_SEND_WAIT = 0x00020000,
+ SCE_NET_SOCKINFO_F_RECV_EWAIT = 0x00040000,
+ SCE_NET_SOCKINFO_F_SEND_EWAIT = 0x00080000,
+ SCE_NET_SOCKINFO_F_WAKEUP_SIGNAL = 0x00100000,
+ SCE_NET_SOCKINFO_F_ALL = 0x001F0007
+};
+
+/** Flags to specify as argument to ::sceNetEmulationGet() / ::sceNetEmulationSet() */
+enum {
+ SCE_NET_EMULATION_FLAG_ETH0 = 1,
+ SCE_NET_EMULATION_FLAG_WLAN0
+};
+
+/** Flags to specify as argument to ::sceNetResolverStartNtoa() / ::sceNetResolverStartAton() */
+enum {
+ SCE_NET_RESOLVER_ASYNC = 0x00000001,
+ SCE_NET_RESOLVER_START_NTOA_DISABLE_IPADDRESS = 0x00010000
+};
+
+/** Flags to specify as argument to ::sceNetResolverAbort() */
+enum {
+ SCE_NET_RESOLVER_ABORT_FLAG_NTOA_PRESERVATION = 0x00000001,
+ SCE_NET_RESOLVER_ABORT_FLAG_ATON_PRESERVATION = 0x00000002
+};
+
+/** Flags to specify as argument to ::sceNetSocketAbort() */
+enum {
+ SCE_NET_SOCKET_ABORT_FLAG_RCV_PRESERVATION = 0x00000001,
+ SCE_NET_SOCKET_ABORT_FLAG_SND_PRESERVATION = 0x00000002
+};
+
+/** Net Protocols */
+enum {
+ SCE_NET_IPPROTO_IP = 0,
+ SCE_NET_IPPROTO_ICMP = 1,
+ SCE_NET_IPPROTO_IGMP = 2,
+ SCE_NET_IPPROTO_TCP = 6,
+ SCE_NET_IPPROTO_UDP = 17,
+ SCE_NET_SOL_SOCKET = 0xffff
+};
+
+/** Socket Options */
+enum {
+ /* IP */
+ SCE_NET_IP_HDRINCL = 2,
+ SCE_NET_IP_TOS = 3,
+ SCE_NET_IP_TTL = 4,
+ SCE_NET_IP_MULTICAST_IF = 9,
+ SCE_NET_IP_MULTICAST_TTL = 10,
+ SCE_NET_IP_MULTICAST_LOOP = 11,
+ SCE_NET_IP_ADD_MEMBERSHIP = 12,
+ SCE_NET_IP_DROP_MEMBERSHIP = 13,
+ SCE_NET_IP_TTLCHK = 23,
+ SCE_NET_IP_MAXTTL = 24,
+ /* TCP */
+ SCE_NET_TCP_NODELAY = 1,
+ SCE_NET_TCP_MAXSEG = 2,
+ SCE_NET_TCP_MSS_TO_ADVERTISE = 3,
+ /* SOCKET */
+ SCE_NET_SO_REUSEADDR = 0x00000004,
+ SCE_NET_SO_KEEPALIVE = 0x00000008,
+ SCE_NET_SO_BROADCAST = 0x00000020,
+ SCE_NET_SO_LINGER = 0x00000080,
+ SCE_NET_SO_OOBINLINE = 0x00000100,
+ SCE_NET_SO_REUSEPORT = 0x00000200,
+ SCE_NET_SO_ONESBCAST = 0x00000800,
+ SCE_NET_SO_USECRYPTO = 0x00001000,
+ SCE_NET_SO_USESIGNATURE = 0x00002000,
+ SCE_NET_SO_SNDBUF = 0x1001,
+ SCE_NET_SO_RCVBUF = 0x1002,
+ SCE_NET_SO_SNDLOWAT = 0x1003,
+ SCE_NET_SO_RCVLOWAT = 0x1004,
+ SCE_NET_SO_SNDTIMEO = 0x1005,
+ SCE_NET_SO_RCVTIMEO = 0x1006,
+ SCE_NET_SO_ERROR = 0x1007,
+ SCE_NET_SO_TYPE = 0x1008,
+ SCE_NET_SO_NBIO = 0x1100,
+ SCE_NET_SO_TPPOLICY = 0x1101,
+ SCE_NET_SO_NAME = 0x1102
+};
+
+/** Socket types */
+enum {
+ SCE_NET_SOCK_STREAM = 1,
+ SCE_NET_SOCK_DGRAM = 2,
+ SCE_NET_SOCK_RAW = 3,
+ SCE_NET_SOCK_DGRAM_P2P = 6,
+ SCE_NET_SOCK_STREAM_P2P = 10
+};
+
+/** MSG Flags */
+enum {
+ SCE_NET_MSG_PEEK = 0x00000002,
+ SCE_NET_MSG_WAITALL = 0x00000040,
+ SCE_NET_MSG_DONTWAIT = 0x00000080,
+ SCE_NET_MSG_USECRYPTO = 0x00000400,
+ SCE_NET_MSG_USESIGNATURE = 0x00000800
+};
+
+/** Flags to specify as argument to ::sceNetShutdown() */
+enum {
+ SCE_NET_SHUT_RD,
+ SCE_NET_SHUT_WR,
+ SCE_NET_SHUT_RDWR
+};
+
+/** Types to specify to ::SceNetIcmpHeader structure */
+enum {
+ SCE_NET_ICMP_TYPE_ECHO_REPLY = 0,
+ SCE_NET_ICMP_TYPE_DEST_UNREACH = 3,
+ SCE_NET_ICMP_TYPE_SOURCE_QUENCH = 4,
+ SCE_NET_ICMP_TYPE_REDIRECT = 5,
+ SCE_NET_ICMP_TYPE_ECHO_REQUEST = 8,
+ SCE_NET_ICMP_TYPE_TIME_EXCEEDED = 11,
+ SCE_NET_ICMP_TYPE_PARAMETER_PROBLEM = 12,
+ SCE_NET_ICMP_TYPE_TIMESTAMP_REQUEST = 13,
+ SCE_NET_ICMP_TYPE_TIMESTAMP_REPLY = 14,
+ SCE_NET_ICMP_TYPE_INFORMATION_REQUEST = 15,
+ SCE_NET_ICMP_TYPE_INFORMATION_REPLY = 16,
+ SCE_NET_ICMP_TYPE_ADDRESS_MASK_REQUEST = 17,
+ SCE_NET_ICMP_TYPE_ADDRESS_MASK_REPLY = 18
+};
+
+/** Codes to specify to ::SceNetIcmpHeader structure */
+enum {
+ SCE_NET_ICMP_CODE_DEST_UNREACH_NET_UNREACH = 0,
+ SCE_NET_ICMP_CODE_DEST_UNREACH_HOST_UNREACH = 1,
+ SCE_NET_ICMP_CODE_DEST_UNREACH_PROTO_UNREACH = 2,
+ SCE_NET_ICMP_CODE_DEST_UNREACH_PORT_UNREACH = 3,
+ SCE_NET_ICMP_CODE_DEST_UNREACH_FRAG_AND_DF = 4,
+ SCE_NET_ICMP_CODE_DEST_UNREACH_SRC_HOST_FAILED = 5,
+ SCE_NET_ICMP_CODE_DEST_UNREACH_DST_NET_UNKNOWN = 6,
+ SCE_NET_ICMP_CODE_DEST_UNREACH_DST_HOST_UNKNOWN = 7,
+ SCE_NET_ICMP_CODE_DEST_UNREACH_SRC_HOST_ISOLATED = 8,
+ SCE_NET_ICMP_CODE_DEST_UNREACH_NET_ADMIN_PROHIBITED = 9,
+ SCE_NET_ICMP_CODE_DEST_UNREACH_NET_HOST_PROHIBITED = 10,
+ SCE_NET_ICMP_CODE_DEST_UNREACH_NET_TOS = 11,
+ SCE_NET_ICMP_CODE_DEST_UNREACH_HOST_TOS = 12,
+ SCE_NET_ICMP_CODE_TIME_EXCEEDED_TTL_EXCEEDED = 0,
+ SCE_NET_ICMP_CODE_TIME_EXCEEDED_FRT_EXCEEDED = 1
+};
+
+/* Defines */
+#define SCE_NET_EPOLL_ABORT_FLAG_PRESERVATION 0x00000001
+
+#define SCE_NET_IP_DEFAULT_MULTICAST_TTL 1
+#define SCE_NET_IP_DEFAULT_MULTICAST_LOOP 1
+
+#define SCE_NET_IPVERSION 4
+
+#define SCE_NET_IP_RF 0x8000
+#define SCE_NET_IP_DF 0x4000
+#define SCE_NET_IP_MF 0x2000
+#define SCE_NET_IP_OFFMASK 0x1fff
+
+#define SCE_NET_INADDR_ANY 0x00000000
+#define SCE_NET_INADDR_LOOPBACK 0x7f000001
+#define SCE_NET_INADDR_BROADCAST 0xffffffff
+#define SCE_NET_INADDR_UNSPEC_GROUP 0xe0000000
+#define SCE_NET_INADDR_AUTOIP 0xa9fe0000
+
+#define SCE_NET_IN_CLASSD_NET 0xf0000000
+#define SCE_NET_IN_AUTOIP_NET 0xffff0000
+
+#define SCE_NET_ADHOC_PORT 3658
+
+#define SCE_NET_AF_INET 2
+
+#define SCE_NET_DEBUG_NAME_LEN_MAX 31
+
+#define SCE_NET_RESOLVER_PORT 53
+#define SCE_NET_RESOLVER_HOSTNAME_LEN_MAX 255
+
+#define SCE_NET_ID_SOCKET_MIN 0
+#define SCE_NET_ID_SOCKET_MAX 1023
+
+/* callback */
+
+typedef void *(*SceNetResolverFunctionAllocate)(
+ unsigned int size,
+ int rid,
+ const char *name,
+ void *user);
+typedef void (*SceNetResolverFunctionFree)(
+ void *ptr,
+ int rid,
+ const char *name,
+ void *user);
+
+/* struct */
+
+typedef struct SceNetFdSet {
+ unsigned int bits[32];
+} SceNetFdSet;
+
+typedef struct SceNetInAddr {
+ unsigned int s_addr;
+} SceNetInAddr;
+
+typedef struct SceNetSockaddrIn {
+ unsigned char sin_len;
+ unsigned char sin_family;
+ unsigned short int sin_port;
+ SceNetInAddr sin_addr;
+ unsigned short int sin_vport;
+ char sin_zero[6];
+} SceNetSockaddrIn;
+
+typedef struct SceNetIpMreq {
+ SceNetInAddr imr_multiaddr;
+ SceNetInAddr imr_interface;
+} SceNetIpMreq;
+
+typedef struct SceNetInitParam {
+ void *memory;
+ int size;
+ int flags;
+} SceNetInitParam;
+
+typedef struct SceNetEmulationData {
+ unsigned short int drop_rate;
+ unsigned short int drop_duration;
+ unsigned short int pass_duration;
+ unsigned short int delay_time;
+ unsigned short int delay_jitter;
+ unsigned short int order_rate;
+ unsigned short int order_delay_time;
+ unsigned short int duplication_rate;
+ unsigned int bps_limit;
+ unsigned short int lower_size_limit;
+ unsigned short int upper_size_limit;
+ unsigned int system_policy_pattern;
+ unsigned int game_policy_pattern;
+ unsigned short int policy_flags[64];
+ unsigned char reserved[64];
+} SceNetEmulationData;
+
+typedef struct SceNetEmulationParam {
+ unsigned short int version;
+ unsigned short int option_number;
+ unsigned short int current_version;
+ unsigned short int result;
+ unsigned int flags;
+ unsigned int reserved1;
+ SceNetEmulationData send;
+ SceNetEmulationData recv;
+ unsigned int seed;
+ unsigned char reserved[44];
+} SceNetEmulationParam;
+
+typedef struct SceNetEtherAddr {
+ unsigned char data[6];
+} SceNetEtherAddr;
+
+typedef struct SceNetDnsInfo {
+ SceNetInAddr dns_addr[2];
+} SceNetDnsInfo;
+
+typedef struct SceNetEpollDataExt {
+ int id;
+ unsigned int u32;
+} SceNetEpollDataExt;
+
+typedef union SceNetEpollData {
+ void *ptr;
+ int fd;
+ unsigned int u32;
+ unsigned long long int u64;
+ SceNetEpollDataExt ext;
+} SceNetEpollData;
+
+typedef struct SceNetEpollSystemData {
+ unsigned int system[4];
+} SceNetEpollSystemData;
+
+typedef struct SceNetEpollEvent {
+ unsigned int events;
+ unsigned int reserved;
+ SceNetEpollSystemData system;
+ SceNetEpollData data;
+} SceNetEpollEvent;
+
+typedef struct SceNetResolverParam {
+ SceNetResolverFunctionAllocate allocate;
+ SceNetResolverFunctionFree free;
+ void *user;
+} SceNetResolverParam;
+
+typedef struct SceNetLinger {
+ int l_onoff;
+ int l_linger;
+} SceNetLinger;
+
+typedef struct SceNetSockaddr {
+ unsigned char sa_len;
+ unsigned char sa_family;
+ char sa_data[14];
+} SceNetSockaddr;
+
+typedef struct SceNetIovec {
+ void *iov_base;
+ unsigned int iov_len;
+} SceNetIovec;
+
+typedef struct SceNetMsghdr {
+ void *msg_name;
+ unsigned int msg_namelen;
+ SceNetIovec *msg_iov;
+ int msg_iovlen;
+ void *msg_control;
+ unsigned int msg_controllen;
+ int msg_flags;
+} SceNetMsghdr;
+
+typedef struct SceNetSockInfo {
+ char name[SCE_NET_DEBUG_NAME_LEN_MAX + 1];
+ int pid;
+ int s;
+ char socket_type;
+ char policy;
+ short int reserved16;
+ int recv_queue_length;
+ int send_queue_length;
+ SceNetInAddr local_adr;
+ SceNetInAddr remote_adr;
+ unsigned short int local_port;
+ unsigned short int remote_port;
+ unsigned short int local_vport;
+ unsigned short int remote_vport;
+ int state;
+ int flags;
+ int reserved[8];
+} SceNetSockInfo;
+
+typedef struct SceNetStatisticsInfo {
+
+ int kernel_mem_free_size;
+ int kernel_mem_free_min;
+ int packet_count;
+ int packet_qos_count;
+
+ int libnet_mem_free_size;
+ int libnet_mem_free_min;
+} SceNetStatisticsInfo;
+
+typedef struct SceNetIpHeaderIpVerHl {
+ unsigned char hl;
+ unsigned char ver;
+} SceNetIpHeaderIpVerHl;
+
+typedef union SceNetIpHeaderUnion {
+ SceNetIpHeaderIpVerHl ip_ver_hl;
+ unsigned char ver_hl;
+} SceNetIpHeaderUnion;
+
+typedef struct SceNetIpHeader {
+ SceNetIpHeaderUnion un;
+ unsigned char ip_tos;
+ unsigned short ip_len;
+ unsigned short ip_id;
+ unsigned short ip_off;
+ unsigned char ip_ttl;
+ unsigned char ip_p;
+ unsigned short ip_sum;
+ SceNetInAddr ip_src;
+ SceNetInAddr ip_dst;
+} SceNetIpHeader;
+
+typedef struct SceNetIcmpHeaderEcho {
+ unsigned short id;
+ unsigned short sequence;
+} SceNetIcmpHeaderEcho;
+
+typedef struct SceNetIcmpHeaderFrag {
+ unsigned short unused;
+ unsigned short mtu;
+} SceNetIcmpHeaderFrag;
+
+typedef union SceNetIcmpHeaderUnion {
+ SceNetIcmpHeaderEcho echo;
+ unsigned int gateway;
+ SceNetIcmpHeaderFrag frag;
+} SceNetIcmpHeaderUnion;
+
+typedef struct SceNetIcmpHeader {
+ unsigned char type;
+ unsigned char code;
+ unsigned short checksum;
+ SceNetIcmpHeaderUnion un;
+} SceNetIcmpHeader;
+
+/* prototypes */
+
+int sceNetSocket(const char *name, int domain, int type, int protocol);
+int sceNetAccept(int s, SceNetSockaddr *addr, unsigned int *addrlen);
+int sceNetBind(int s, const SceNetSockaddr *addr, unsigned int addrlen);
+int sceNetListen(int s, int backlog);
+int sceNetRecv(int s, void *buf, unsigned int len, int flags);
+int sceNetRecvfrom(int s, void *buf, unsigned int len, int flags, SceNetSockaddr *from, unsigned int *fromlen);
+int sceNetSend(int s, const void *msg, unsigned int len, int flags);
+int sceNetSendto(int s, const void *msg, unsigned int len, int flags, const SceNetSockaddr *to, unsigned int tolen);
+int sceNetSetsockopt(int s, int level, int optname, const void *optval, unsigned int optlen);
+int sceNetSocketClose(int s);
+
+/* fixme ? */
+#define sceNetHtons __builtin_bswap16
+#define sceNetHtonl __builtin_bswap32
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _PSP2_KERNEL_NET_NET_H_ */
diff --git a/include/kernel/sblacmgr.h b/include/kernel/sblacmgr.h
index 3f4143d..99621dc 100644
--- a/include/kernel/sblacmgr.h
+++ b/include/kernel/sblacmgr.h
@@ -17,3 +17,4 @@ int sceSblACMgrIsDevelopmentMode(void);
#endif
#endif /* _PSP2_KERNEL_SBLACMGR_H_ */
+
diff --git a/include/user/appmgr.h b/include/user/appmgr.h
index e6fffaa..f93e608 100644
--- a/include/user/appmgr.h
+++ b/include/user/appmgr.h
@@ -140,3 +140,4 @@ int sceAppMgrUmount(const char *mount_point);
#endif
#endif /* _PSP2_APPMGR_H_ */
+
diff --git a/include/user/ctrl.h b/include/user/ctrl.h
index 5567b8a..dbd18cc 100644
--- a/include/user/ctrl.h
+++ b/include/user/ctrl.h
@@ -17,23 +17,23 @@ enum {
/** Enumeration for the digital controller buttons.
* L1/R1/L3/R3 only can bind using sceCtrlReadBufferPositiveExt2 */
enum {
- SCE_CTRL_SELECT = 0x000001, //!< Select button.
- SCE_CTRL_L3 = 0x000002, //!< L3 button.
- SCE_CTRL_R3 = 0x000004, //!< R3 button.
- SCE_CTRL_START = 0x000008, //!< Start button.
- SCE_CTRL_UP = 0x000010, //!< Up D-Pad button.
- SCE_CTRL_RIGHT = 0x000020, //!< Right D-Pad button.
- SCE_CTRL_DOWN = 0x000040, //!< Down D-Pad button.
- SCE_CTRL_LEFT = 0x000080, //!< Left D-Pad button.
- SCE_CTRL_LTRIGGER = 0x000100, //!< Left trigger.
- SCE_CTRL_RTRIGGER = 0x000200, //!< Right trigger.
- SCE_CTRL_L1 = 0x000400, //!< L1 button.
- SCE_CTRL_R1 = 0x000800, //!< R1 button.
- SCE_CTRL_TRIANGLE = 0x001000, //!< Triangle button.
- SCE_CTRL_CIRCLE = 0x002000, //!< Circle button.
- SCE_CTRL_CROSS = 0x004000, //!< Cross button.
- SCE_CTRL_SQUARE = 0x008000, //!< Square button.
- SCE_CTRL_ANY = 0x010000 //!< Any input intercepted.
+ SCE_CTRL_SELECT = 0x000001, //!< Select button.
+ SCE_CTRL_L3 = 0x000002, //!< L3 button.
+ SCE_CTRL_R3 = 0x000004, //!< R3 button.
+ SCE_CTRL_START = 0x000008, //!< Start button.
+ SCE_CTRL_UP = 0x000010, //!< Up D-Pad button.
+ SCE_CTRL_RIGHT = 0x000020, //!< Right D-Pad button.
+ SCE_CTRL_DOWN = 0x000040, //!< Down D-Pad button.
+ SCE_CTRL_LEFT = 0x000080, //!< Left D-Pad button.
+ SCE_CTRL_LTRIGGER = 0x000100, //!< Left trigger.
+ SCE_CTRL_RTRIGGER = 0x000200, //!< Right trigger.
+ SCE_CTRL_L1 = 0x000400, //!< L1 button.
+ SCE_CTRL_R1 = 0x000800, //!< R1 button.
+ SCE_CTRL_TRIANGLE = 0x001000, //!< Triangle button.
+ SCE_CTRL_CIRCLE = 0x002000, //!< Circle button.
+ SCE_CTRL_CROSS = 0x004000, //!< Cross button.
+ SCE_CTRL_SQUARE = 0x008000, //!< Square button.
+ SCE_CTRL_INTERCEPTED = 0x010000 //!< Input not available because intercepted by another application
};
/** Enumeration for the controller types. */
diff --git a/include/user/display.h b/include/user/display.h
index 8a5a4f4..84d1887 100644
--- a/include/user/display.h
+++ b/include/user/display.h
@@ -153,3 +153,4 @@ int sceDisplayUnregisterVblankStartCallback(SceUID uid);
#endif
#endif /* _PSP2_DISPLAY_H_ */
+
diff --git a/include/user/io/devctl.h b/include/user/io/devctl.h
index 5237ac9..e551abe 100644
--- a/include/user/io/devctl.h
+++ b/include/user/io/devctl.h
@@ -84,3 +84,4 @@ int sceIoIoctlAsync(SceUID fd, unsigned int cmd, void *indata, int inlen, void *
#endif
#endif /* _PSP2_IO_DEVCTRL_H_ */
+
diff --git a/include/user/kernel/clib.h b/include/user/kernel/clib.h
index bb8ba0d..6db799d 100644
--- a/include/user/kernel/clib.h
+++ b/include/user/kernel/clib.h
@@ -9,12 +9,24 @@ extern "C" {
#endif
int sceClibStrcmp(const char *, const char *);
+void *sceClibStrncmp(const char *, const char *, SceSize);
+int sceClibStrncasecmp(const char *, const char *, SceSize);
+char *sceClibStrncpy(char *, const char *, SceSize);
+char *sceClibStrncat(char *, const char *, SceSize);
+SceSize sceClibStrnlen(const char *, SceSize);
+char *sceClibStrrchr(const char *, int);
+int sceClibPrintf(const char *, ...);
int sceClibSnprintf(char *, SceSize, const char *, ...);
int sceClibVsnprintf(char *, SceSize, const char *, va_list);
+void *sceClibMemset(void *, int, SceSize);
+void *sceClibMemcpy(void *, const void *, SceSize);
+void *sceClibMemmove(void *, const void *, SceSize);
+
#ifdef __cplusplus
}
#endif
#endif /* _PSP2_KERNEL_CLIB_H_ */
+
diff --git a/include/user/kernel/modulemgr.h b/include/user/kernel/modulemgr.h
index abdf387..d7ad72c 100644
--- a/include/user/kernel/modulemgr.h
+++ b/include/user/kernel/modulemgr.h
@@ -88,3 +88,4 @@ int sceKernelGetSystemSwVersion(SceKernelFwInfo *data);
#endif
#endif /* _PSP2_KERNEL_MODULEMGR_H_ */
+
diff --git a/include/user/kernel/processmgr.h b/include/user/kernel/processmgr.h
index cef7251..c256157 100644
--- a/include/user/kernel/processmgr.h
+++ b/include/user/kernel/processmgr.h
@@ -85,3 +85,4 @@ SceUID sceKernelGetProcessId(void);
#endif
#endif /* _PSP2_KERNEL_PROCESSMGR_H_ */
+
diff --git a/include/user/kernel/rng.h b/include/user/kernel/rng.h
index 108362f..88e0267 100644
--- a/include/user/kernel/rng.h
+++ b/include/user/kernel/rng.h
@@ -20,3 +20,4 @@ int sceKernelGetRandomNumber(void *output, unsigned size);
#endif
#endif /* _PSP2_KERNEL_RNG_H_ */
+
diff --git a/include/user/kernel/sysmem.h b/include/user/kernel/sysmem.h
index 8d21ecb..4dd4884 100644
--- a/include/user/kernel/sysmem.h
+++ b/include/user/kernel/sysmem.h
@@ -111,3 +111,4 @@ int sceKernelGetModel();
#endif
#endif
+
diff --git a/include/user/kernel/threadmgr.h b/include/user/kernel/threadmgr.h
index 0718003..9225fb1 100644
--- a/include/user/kernel/threadmgr.h
+++ b/include/user/kernel/threadmgr.h
@@ -1046,3 +1046,4 @@ void *sceKernelGetTLSAddr(int key);
#endif
#endif /* _PSP2_KERNEL_THREADMGR_H_ */
+
diff --git a/include/user/npdrmpackage.h b/include/user/npdrmpackage.h
new file mode 100644
index 0000000..5a41475
--- /dev/null
+++ b/include/user/npdrmpackage.h
@@ -0,0 +1,51 @@
+#ifndef _PSP2_NPDRMPACKAGE_H_
+#define _PSP2_NPDRMPACKAGE_H_
+
+#include <psp2/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** Options for _sceNpDrmPackageDecrypt */
+typedef struct {
+ /** The offset in the encrypted data */
+ SceOff offset;
+
+ /**
+ * The identifier specified for _sceNpDrmPackageCheck but NOT ORed
+ * with (1 << 8)
+ */
+ unsigned int identifier;
+} _sceNpDrmPackageDecrypt_opt;
+
+/**
+ * Read the header of the PKG and initialize the context
+ *
+ * @param buffer - The buffer containing the header of PKG.
+ * @param size - The size of buffer. The minimum confirmed value is 0x8000.
+ * @param zero - Unknown. Supposed to be set to 0.
+ * @param identifier - arbitrary value [0, 6) ORed with (1 << 8) or 0.
+ * If it is set to 0, the function just checks the header
+ * and doesn't create the context.
+ *
+ * @return 0 on success, != 0 on error
+ */
+int _sceNpDrmPackageCheck(const void *buffer, SceSize size, int zero, unsigned int identifier);
+
+/**
+ * Decrypt a PKG
+ *
+ * @param buffer - The buffer containing the content of the PKG.
+ * @param size - The size of the buffer. The minimum confirmed value is 0x20.
+ * @param opt - The options.
+ *
+ * @return 0 on success, != 0 on error
+ */
+int _sceNpDrmPackageDecrypt(void * restrict buffer, SceSize size, _sceNpDrmPackageDecrypt_opt * restrict opt);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _PSP2_NPDRMPACKAGE_H_ */
diff --git a/include/user/power.h b/include/user/power.h
index 23b4470..7f9dd04 100644
--- a/include/user/power.h
+++ b/include/user/power.h
@@ -3,6 +3,7 @@
#include <psp2/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -166,3 +167,4 @@ int scePowerSetGpuXbarClockFrequency(int freq);
#endif
#endif /* _PSP2_POWER_H_ */
+
diff --git a/include/user/promoterutil.h b/include/user/promoterutil.h
new file mode 100644
index 0000000..117b4c3
--- /dev/null
+++ b/include/user/promoterutil.h
@@ -0,0 +1,93 @@
+#ifndef _PSP2_PROMOTERUTIL_H_
+#define _PSP2_PROMOTERUTIL_H_
+
+#include <psp2/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** Parameters for scePromoterUtilityUpdateLiveArea() */
+typedef struct ScePromoterUtilityLAUpdate {
+ char titleid[12]; //!< Target app.
+ char path[128]; //!< Directory of extracted LA update data.
+} ScePromoterUtilityLAUpdate;
+
+/**
+ * Init the promoter utility.
+ * \note Needs to be called before using the other functions.
+ *
+ * @return 0 on success.
+ */
+int scePromoterUtilityInit(void);
+
+/**
+ * Deinit the promoter utility.
+ *
+ * @return 0 on success.
+ */
+int scePromoterUtilityExit(void);
+
+/**
+ * Delete a package from the LiveArea.
+ *
+ * @param[in] *titleid
+ *
+ * @return 0 on success.
+ */
+int scePromoterUtilityDeletePkg(const char *titleid);
+
+/**
+ * Update the LiveArea ressources of an app
+ *
+ * @param[in] *args - see ::ScePromoterUtilityLAUpdate
+ *
+ * @return 0 on success.
+ */
+int scePromoterUtilityUpdateLiveArea(ScePromoterUtilityLAUpdate *args);
+
+/**
+ * Install a package from a directory, and add an icon on the LiveArea.
+ * \note It is an asynchronous function.
+ *
+ * @param[in] *path - the path of the directory where the extracted content of the package is
+ * @param unk - unknown, pass 0
+ *
+ * @return 0 on success.
+ */
+int scePromoterUtilityPromotePkg(const char *path, int unk);
+
+/**
+ * Install a package from a directory and generate a rif.
+ * \note It is an asynchronous function.
+ *
+ * @param[in] *path - the path of the directory where the extracted content of the package is
+ * @param unk - unknown, pass 0
+ *
+ * @return 0 on success.
+ */
+int scePromoterUtilityPromotePkgWithRif(const char *path, int unk);
+
+/**
+ * Returns the state of an operation.
+ *
+ * @param[out] *state - the current status, 0 when finished
+ *
+ * @return <0 if failed.
+ */
+int scePromoterUtilityGetState(int *state);
+
+/**
+ * Returns the result of a finished operation
+ *
+ * @param[out] *res - the result, 0 on success
+ *
+ * @return <0 if failed.
+ */
+int scePromoterUtilityGetResult(int *res);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _PSP2_PROMOTERUTIL_H_ */
diff --git a/include/user/pss.h b/include/user/pss.h
index d79a868..586f644 100644
--- a/include/user/pss.h
+++ b/include/user/pss.h
@@ -17,3 +17,4 @@ void pss_code_mem_unlock(void);
#endif
#endif /* _PSP2_PSS_H_ */
+
diff --git a/include/user/shellutil.h b/include/user/shellutil.h
index ceb413d..1f77727 100644
--- a/include/user/shellutil.h
+++ b/include/user/shellutil.h
@@ -70,3 +70,4 @@ int sceShellUtilUnlock(int type);
#endif
#endif /* _PSP2_SHELLUTIL_H_ */
+
diff --git a/include/user/sysmodule.h b/include/user/sysmodule.h
index 1ef7d2c..8cc2a37 100644
--- a/include/user/sysmodule.h
+++ b/include/user/sysmodule.h
@@ -74,12 +74,23 @@ enum {
SCE_SYSMODULE_AVPLAYER = 0x004c
};
+/* internal module IDs */
+enum {
+ SCE_SYSMODULE_PAF = 0x80000008,
+ SCE_SYSMODULE_PROMOTER_UTIL = 0x80000024
+};
+
int sceSysmoduleLoadModule(SceUInt16 id);
int sceSysmoduleUnloadModule(SceUInt16 id);
int sceSysmoduleIsLoaded(SceUInt16 id);
+int sceSysmoduleLoadModuleInternal(SceUInt32 id);
+int sceSysmoduleUnloadModuleInternal(SceUInt32 id);
+int sceSysmoduleIsLoadedInternal(SceUInt32 id);
+int sceSysmoduleLoadModuleInternalWithArg(SceUInt32 id, SceSize args, void *argp, void *unk);
#ifdef __cplusplus
}
#endif
#endif /* _PSP2_SYSMODULE_H_ */
+
diff --git a/nids/360/SceBt.yml b/nids/360/SceBt.yml
index a7d4837..7912910 100644
--- a/nids/360/SceBt.yml
+++ b/nids/360/SceBt.yml
@@ -1,10 +1,101 @@
modules:
SceBt:
- nid: 0x00000012
+ nid: 0xED3D9A39
libraries:
SceBt:
- nid: 0x00000013
+ nid: 0x9785DB68
functions:
+ sceBtAvrcpReadVolume: 0x01000531
+ sceBtAvrcpSendButton: 0x9F8724E7
+ sceBtAvrcpSendVolume: 0xC5C7003B
+ sceBtAvrcpSetPlayStatus: 0x0DADD51A
+ sceBtAvrcpSetTitle: 0xDD3947B9
+ sceBtDeleteRegisteredInfo: 0xACC959A0
+ sceBtFreqAudio: 0x376DE456
+ sceBtGetConfiguration: 0x9D619F35
+ sceBtGetConnectingInfo: 0xD9B65CAA
+ sceBtGetDeviceName: 0x80977A26
+ sceBtGetInfoForTest: 0xF7756C1F
+ sceBtGetLastError: 0x4E159A08
+ sceBtGetRegisteredInfo: 0xB6C9A094
+ sceBtGetStatusForTest: 0x48A27F7E
+ sceBtGetVidPid: 0xBE01ACE7
+ sceBtHfpGetCurrentPhoneNumber: 0xB0CD46A4
+ sceBtHfpRequest: 0xD924787E
+ sceBtHidGetReportDescriptor: 0x95614634
+ sceBtHidTransfer: 0x88B34B5B
+ sceBtPairingOOB: 0xCBC4FF55
+ sceBtPushBip: 0xE4EA1E59
+ sceBtPushOpp: 0xED78EEC3
sceBtReadEvent: 0x26BAC23D
+ sceBtRecvAudio: 0x469DD0DA
+ sceBtRecvBip: 0xCEF8F261
+ sceBtRecvOpp: 0xA865A081
+ sceBtRecvSpp: 0x112A61AC
sceBtRegisterCallback: 0xA23FB154
+ sceBtReplyPinCode: 0xA4FD7F9A
+ sceBtReplyUserConfirmation: 0xCAABAAC8
+ sceBtSendAudio: 0xE30602A4
+ sceBtSendL2capEchoRequestForTest: 0xCA304973
+ sceBtSendSpp: 0x1FBA44DE
+ sceBtSetConfiguration: 0x9B1F2964
+ sceBtSetContentProtection: 0x5F9ABEAE
+ sceBtSetInquiryResultForTest: 0x2BADF3A9
+ sceBtSetInquiryScan: 0x78855913
+ sceBtSetL2capEchoResponseBufferForTest: 0xB624CFFC
+ sceBtSetStatusForTest: 0x32DA3573
+ sceBtStartAudio: 0x3679D50F
+ sceBtStartConnect: 0xFF3C57EB
+ sceBtStartDisconnect: 0x18286FFF
+ sceBtStartInquiry: 0xA5CDDB17
+ sceBtStopAudio: 0xE423D1CC
+ sceBtStopInquiry: 0xF1C4D466
sceBtUnregisterCallback: 0x605EF71F
+ SceBtForDriver:
+ nid: 0xD48CA62D
+ functions:
+ sceBtAvrcpReadVolume: 0xC9C70056
+ sceBtAvrcpSendButton: 0xEC5F8519
+ sceBtAvrcpSendVolume: 0x7689DA3D
+ sceBtAvrcpSetPlayStatus: 0xC5E7349C
+ sceBtAvrcpSetTitle: 0x91EF55AD
+ sceBtDeleteRegisteredInfo: 0xE6F659E0
+ sceBtFreqAudio: 0xDA20DCC8
+ sceBtGetConfiguration: 0x94C66A3B
+ sceBtGetConnectingInfo: 0xE9936446
+ sceBtGetDeviceName: 0x633F784C
+ sceBtGetInfoForTest: 0x2C9DD7BB
+ sceBtGetLastError: 0xAD31A43E
+ sceBtGetRegisteredInfo: 0xF86D25E2
+ sceBtGetStatusForTest: 0x83781649
+ sceBtGetVidPid: 0x780A5557
+ sceBtHfpGetCurrentPhoneNumber: 0x7BC66D6D
+ sceBtHfpRequest: 0x6E49D11D
+ sceBtHidGetReportDescriptor: 0x06CB4ABA
+ sceBtHidTransfer: 0xF9DCEC77
+ sceBtPushBip: 0x7FF77792
+ sceBtPushOpp: 0x21C788E2
+ sceBtReadEvent: 0x5ABB9A9D
+ sceBtRecvAudio: 0xCD7C0492
+ sceBtRecvBip: 0xE8E95977
+ sceBtRecvOpp: 0x8008AA2C
+ sceBtRecvSpp: 0xC09D9E7C
+ sceBtRegisterCallback: 0x120AC1F7
+ sceBtReplyPinCode: 0xBB69A62A
+ sceBtReplyUserConfirmation: 0xB5FA291C
+ sceBtSendAudio: 0x47F19727
+ sceBtSendL2capEchoRequestForTest: 0xE3A66814
+ sceBtSendSpp: 0x92241DFB
+ sceBtSetConfiguration: 0xEBDCC992
+ sceBtSetContentProtection: 0x08632086
+ sceBtSetInquiryResultForTest: 0x1C26F878
+ sceBtSetInquiryScan: 0x4F5A852E
+ sceBtSetL2capEchoResponseBufferForTest: 0x0B7D8E0E
+ sceBtSetStatusForTest: 0x9C195411
+ sceBtStartAudio: 0x8D47CABD
+ sceBtStartConnect: 0x6059113A
+ sceBtStartDisconnect: 0x50710281
+ sceBtStartInquiry: 0x9DC7E7E5
+ sceBtStopAudio: 0xCAE5A9F3
+ sceBtStopInquiry: 0x6A1D9598
+ sceBtUnregisterCallback: 0xBF72E1BE
diff --git a/nids/360/SceKernelThreadMgr.yml b/nids/360/SceKernelThreadMgr.yml
index ec66d76..9d58838 100644
--- a/nids/360/SceKernelThreadMgr.yml
+++ b/nids/360/SceKernelThreadMgr.yml
@@ -96,11 +96,17 @@ modules:
SceThreadmgrForDriver:
nid: 0xE2C40624
functions:
+ sceKernelCreateCallback: 0x1C41614C
+ sceKernelCreateEventFlag: 0x4336BAA4
sceKernelCreateThread: 0xC6674E7D
+ sceKernelDelayThread: 0x4B675D05
+ sceKernelDelayThreadCB: 0x9C0180E1
+ sceKernelDeleteCallback: 0x3A7E17F6
sceKernelDeleteThread: 0xAC834F3F
sceKernelGetProcessId: 0x9DCB4B7A
sceKernelGetSystemTimeWide: 0xF4EE4FA9
sceKernelStartThread: 0x21F5419B
+ sceKernelWaitEventFlagCB: 0x8A35F714
sceKernelWaitThreadEnd: 0x3E20216F
SceThreadmgrForKernel:
nid: 0xA8CA0EFD
diff --git a/nids/360/SceNetPs.yml b/nids/360/SceNetPs.yml
new file mode 100644
index 0000000..d32c0bd
--- /dev/null
+++ b/nids/360/SceNetPs.yml
@@ -0,0 +1,17 @@
+modules:
+ SceNetPs:
+ nid: 0x5A7BCCDA
+ libraries:
+ SceNetPsForDriver:
+ nid: 0xB2A5C920
+ functions:
+ sceNetAccept: 0x880A5423
+ sceNetBind: 0x84AB650F
+ sceNetListen: 0x080C7992
+ sceNetRecv: 0x49B1669C
+ sceNetRecvfrom: 0x49B1669C
+ sceNetSend: 0xAB746734
+ sceNetSendto: 0xAB746734
+ sceNetSetsockopt: 0x4BF5FAB4
+ sceNetSocket: 0xEB95B024
+ sceNetSocketClose: 0x21F4428D
diff --git a/nids/360/SceNpDrmPackage.yml b/nids/360/SceNpDrmPackage.yml
new file mode 100644
index 0000000..e7731fe
--- /dev/null
+++ b/nids/360/SceNpDrmPackage.yml
@@ -0,0 +1,9 @@
+modules:
+ SceNpDrmPackage:
+ nid: 0x00000078
+ libraries:
+ SceNpDrmPackage:
+ nid: 0x88514DB2
+ functions:
+ _sceNpDrmPackageCheck: 0xA1D885FA
+ _sceNpDrmPackageDecrypt: 0xD6F05ACC
diff --git a/nids/360/ScePromoterUtil.yml b/nids/360/ScePromoterUtil.yml
new file mode 100644
index 0000000..1288b10
--- /dev/null
+++ b/nids/360/ScePromoterUtil.yml
@@ -0,0 +1,15 @@
+modules:
+ ScePromoterUtil:
+ nid: 0xB31C2D5C
+ libraries:
+ ScePromoterUtil:
+ nid: 0x31F237B6
+ functions:
+ scePromoterUtilityDeletePkg: 0x7D46752F
+ scePromoterUtilityExit: 0xC95D24A6
+ scePromoterUtilityGetResult: 0x49B473F0
+ scePromoterUtilityGetState: 0xABEC74D2
+ scePromoterUtilityInit: 0x93451536
+ scePromoterUtilityPromotePkg: 0x716C81F4
+ scePromoterUtilityPromotePkgWithRif: 0x86641BC6
+ scePromoterUtilityUpdateLiveArea: 0x17D73ECA