Difference between revisions of "Services API"

From Nintendo Switch Brew
Jump to navigation Jump to search
Line 82: Line 82:
 
| acc:u1, acc:su
 
| acc:u1, acc:su
 
| [[Account services]]
 
| [[Account services]]
| u1: for user 1?
+
| u1: User, su: Admin
 
|-
 
|-
 
| appletAE
 
| appletAE
| Applet Accessor services
+
| Applet services
 
|-
 
|-
 
| apm
 
| apm
Line 95: Line 95:
 
|
 
|
 
|-
 
|-
| arp:w
+
| arp:r, arp:w
| ?  
+
| Activity Report services?  
|
+
| r: Reader, w: Writer
|-
 
| audren:u
 
| Audio Renderer services
 
|
 
 
|-
 
|-
| audout:u
+
| audin:u, audout:u, audren:u
| Audio Out services
+
| Audio services
 
|
 
|
 
|-
 
|-
Line 180: Line 176:
 
|-
 
|-
 
| erpt:c
 
| erpt:c
| ERPT(?) services
+
| Error Report services
 
|
 
|
 
|-
 
|-
Line 188: Line 184:
 
|-
 
|-
 
| ncm
 
| ncm
| ?
+
| Content Manager services
 
|  
 
|  
 
|-
 
|-
Line 253: Line 249:
 
| set, set:sys
 
| set, set:sys
 
| [[Settings services]]
 
| [[Settings services]]
| sys: System settings
+
| sys: System Settings
 
|-
 
|-
 
| sfdnsres
 
| sfdnsres

Revision as of 14:52, 6 June 2017

Services are system processes running in the background which wait for incoming requests. When a process wants to communicate with a service, it first needs to get a handle to the named service, and then it can communicate with the service via inter-process communication (each service has a name up to 8 characters).

Handles for services are retrieved from the service manager port, "sm:". Services are an abstraction of ports, they operate the same way except regular ports can have their handles retrieved directly from a SVC.

sm:

Cmd Name
0 #Initialize
1 #GetService
2 #RegisterService
3

Initialize

Word Value
0 0x00000004
1 0x8000000A
2 0x00000001
0-1 Pid
0 "SFCI"
1 0x00000000
2 Always 0.

GetService

Word Value
0 0x00000004
1 0x0000000A
0 "SFCI"
1 0x00000001
2 Service name, zero padded and casted to u64.

RegisterService

Word Value
0 0x00000004
1 0x0000000C
0 "SFCI"
1 0x00000002
2 Service name, zero padded and casted to u64.
3 Max sessions? 32-bit integer.
4 Unknown bool

Service List

Service names Description Notes
acc:u1, acc:su Account services u1: User, su: Admin
appletAE Applet services
apm ?
aoc:u AddOn Content services
arp:r, arp:w Activity Report services? r: Reader, w: Writer
audin:u, audout:u, audren:u Audio services
bgtc:t, bgtc:sc Task services
bpc ?
bsd:u, bsd:s Sockets services
btm ?
caps:a, caps:c, caps:ss Capture services a: Album, ss: Screenshot
es ETicket services?
fan ?
fatal:u Fatal Error services
fgm ?
friend:u, friend:v, friend:m, friend:s, friend:a Friend services
fsp-srv Filesystem services
irs ?
hid, hid:dbg, hid:sys HID services
lbl ?
ldn:m Local Network Monitor services
ldr:ro, ldr:shel Loader services
lm Log services
lr ?
erpt:c Error Report services
mii:u, mii:e Mii services
ncm Content Manager services
nifm:u, nifm:a, nifm:s Network Interface services
nim, nim:shp NIM services shp: eShop
npns:u, npns:s ?
ns:am, ns:su, ns:dev NS Services am: Application Manager, su: System Update
nsd:u, nsd:a NSD services
ntc ?
nvdrv:a, nvmemp, mm:u NV services
omm ?
ovln:rcv, ovln:snd Overlay Notification services
pctl, pctl:a, pctl:s, pctl:r Parental Control services
pcv ?
pdm:ntfy, pdm:qry Play Log services
pl:u Shared Font services
pm:bm, pm:shell Process Manager services
prepo:u, prepo:s, prepo:m, prepo:a Play Report services
set, set:sys Settings services sys: System Settings
sfdnsres DNS resolver services
ssl SSL services
tc ?
time:u, time:a, time:s Time services
ts ?
vi:m, vi:s, vi:u Display services